summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjp abgrall <jpa@google.com>2013-03-11 12:28:06 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2013-03-11 12:28:06 -0700
commit574d6902b7e30a1e9c2375481549c8e8a712d6e6 (patch)
tree797c4b3d81575250820a2bf59d97ad2086894eef
parentd577641411f067c93aabcd2acf7ce06862fb26d3 (diff)
parentba8abb517d1eddebeda62bf907fa446e3c3b81f6 (diff)
downloadframeworks_native-574d6902b7e30a1e9c2375481549c8e8a712d6e6.zip
frameworks_native-574d6902b7e30a1e9c2375481549c8e8a712d6e6.tar.gz
frameworks_native-574d6902b7e30a1e9c2375481549c8e8a712d6e6.tar.bz2
am ba8abb51: Merge "Ensure dumpstate children die"
* commit 'ba8abb517d1eddebeda62bf907fa446e3c3b81f6': Ensure dumpstate children die
-rw-r--r--cmds/dumpstate/utils.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/cmds/dumpstate/utils.c b/cmds/dumpstate/utils.c
index fd390f5..d081590 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);