summaryrefslogtreecommitdiff
path: root/cmds/dumpstate/dumpstate.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cmds/dumpstate/dumpstate.cpp')
-rw-r--r--cmds/dumpstate/dumpstate.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/cmds/dumpstate/dumpstate.cpp b/cmds/dumpstate/dumpstate.cpp
index b391d76e2f..604aea687c 100644
--- a/cmds/dumpstate/dumpstate.cpp
+++ b/cmds/dumpstate/dumpstate.cpp
@@ -198,6 +198,9 @@ static void dump_systrace() {
// The drawback of calling execl directly is that we're not timing out if it hangs.
MYLOGD("Running '/system/bin/atrace --async_dump', which can take several seconds");
execl("/system/bin/atrace", "/system/bin/atrace", "--async_dump", nullptr);
+ // execl should never return, but it doesn't hurt to handle that scenario
+ MYLOGD("execl on '/system/bin/atrace --async_dump' returned control");
+ _exit(-1);
} else {
close(pipefd[1]); // close the write end of the pipe in the parent
add_zip_entry_from_fd("systrace.txt", pipefd[0]); // write output to zip file