diff options
| author | 2013-03-11 19:34:13 +0000 | |
|---|---|---|
| committer | 2013-03-11 19:34:13 +0000 | |
| commit | 1e928f404f83da6ed29dc3d0b28f0a376b12d327 (patch) | |
| tree | 797c4b3d81575250820a2bf59d97ad2086894eef | |
| parent | b1beeb4ab90fa00c24ae853818e2b33f32da851b (diff) | |
| parent | 574d6902b7e30a1e9c2375481549c8e8a712d6e6 (diff) | |
am 574d6902: am ba8abb51: Merge "Ensure dumpstate children die"
* commit '574d6902b7e30a1e9c2375481549c8e8a712d6e6':
  Ensure dumpstate children die
| -rw-r--r-- | cmds/dumpstate/utils.c | 4 | 
1 files changed, 4 insertions, 0 deletions
diff --git a/cmds/dumpstate/utils.c b/cmds/dumpstate/utils.c index fd390f5630..d081590df8 100644 --- a/cmds/dumpstate/utils.c +++ b/cmds/dumpstate/utils.c @@ -31,6 +31,7 @@  #include <sys/klog.h>  #include <time.h>  #include <unistd.h> +#include <sys/prctl.h>  #include <cutils/debugger.h>  #include <cutils/properties.h> @@ -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);  |