}
typedef struct ExecStatusInfo {
+ char *name;
+
char *path;
char **argv;
static void exec_status_info_free(ExecStatusInfo *i) {
assert(i);
+ free(i->name);
free(i->path);
strv_free(i->argv);
free(i);
continue;
t = strv_join(p->argv, " ");
- printf("\t Process: %u (%s, code=%s, ", p->pid, strna(t), sigchld_code_to_string(p->code));
+ printf("\t Process: %u %s=%s (code=%s, ", p->pid, p->name, strna(t), sigchld_code_to_string(p->code));
free(t);
if (p->code == CLD_EXITED) {
if (!(info = new0(ExecStatusInfo, 1)))
return -ENOMEM;
+ if (!(info->name = strdup(name))) {
+ free(info);
+ return -ENOMEM;
+ }
+
if ((r = exec_status_info_deserialize(&sub, info)) < 0) {
free(info);
return r;