Merge "Ensure dumpstate children die"

This commit is contained in:
jp abgrall 2013-03-11 18:09:35 +00:00 committed by Gerrit Code Review
commit ba8abb517d

View File

@ -31,6 +31,7 @@
#include <sys/klog.h> #include <sys/klog.h>
#include <time.h> #include <time.h>
#include <unistd.h> #include <unistd.h>
#include <sys/prctl.h>
#include <cutils/debugger.h> #include <cutils/debugger.h>
#include <cutils/properties.h> #include <cutils/properties.h>
@ -199,6 +200,9 @@ int run_command(const char *title, int timeout_seconds, const char *command, ...
const char *args[1024] = {command}; const char *args[1024] = {command};
size_t arg; size_t arg;
/* make sure the child dies when dumpstate dies */
prctl(PR_SET_PDEATHSIG, SIGKILL);
va_list ap; va_list ap;
va_start(ap, command); va_start(ap, command);
if (title) printf("------ %s (%s", title, command); if (title) printf("------ %s (%s", title, command);