diff --git a/cmds/dumpstate/utils.c b/cmds/dumpstate/utils.c index fd390f563..d081590df 100644 --- a/cmds/dumpstate/utils.c +++ b/cmds/dumpstate/utils.c @@ -31,6 +31,7 @@ #include #include #include +#include #include #include @@ -264,6 +265,9 @@ int run_command(const char *title, int timeout_seconds, const char *command, ... const char *args[1024] = {command}; size_t arg; + /* make sure the child dies when dumpstate dies */ + prctl(PR_SET_PDEATHSIG, SIGKILL); + va_list ap; va_start(ap, command); if (title) printf("------ %s (%s", title, command);