summaryrefslogtreecommitdiff
path: root/procrank
diff options
context:
space:
mode:
authorJP Abgrall <jpa@google.com>2012-05-11 14:09:59 -0700
committerJP Abgrall <jpa@google.com>2012-05-11 14:09:59 -0700
commit80cb15504324667c9934ff350afff48881613393 (patch)
tree03d15e68bd56e456b89d082b65260c0c3b3b59eb /procrank
parent585c219b9b7c2e89b8db6707cacdaf29c362e7ba (diff)
downloadextras-80cb15504324667c9934ff350afff48881613393.tar.gz
Ignore SIGPIPE is some of the tools used via dumpstate
adb bugreport > b & sleep 5; kill $? will show that a bunch of tools will SIGPIPE when trying to output data which is normal. We don't have a way on linux (bsd yes), to set NOSIGPIPE on the file desc passed down via fork/exec. Bug: 6447319 Change-Id: I1634a00a155fd8a3fd827aa4a77e94518534336c
Diffstat (limited to 'procrank')
-rw-r--r--procrank/procrank.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/procrank/procrank.c b/procrank/procrank.c
index 28d6f251..061f40f4 100644
--- a/procrank/procrank.c
+++ b/procrank/procrank.c
@@ -133,6 +133,7 @@ int main(int argc, char *argv[]) {
int arg;
size_t i, j;
+ signal(SIGPIPE, SIG_IGN);
compfn = &sort_by_pss;
order = -1;
ws = WS_OFF;