summaryrefslogtreecommitdiff
path: root/cmds/dumpstate/utils.cpp
diff options
context:
space:
mode:
author Felipe Leme <felipeal@google.com> 2016-03-23 18:50:37 +0000
committer Android (Google) Code Review <android-gerrit@google.com> 2016-03-23 18:50:37 +0000
commitd97e18c038f23cecbe3d5e95fabf4dcd2bfaac20 (patch)
tree01c5d9737fa547c0a2cf6700b7bf929fcbf07869 /cmds/dumpstate/utils.cpp
parenteff45d06902c2a9dc523848a652d2456dfa19d7a (diff)
parentec72578b8461a5601962ea8102fd74a1f86d91fb (diff)
Merge "Flushes stdout when execvp fails." into nyc-dev
Diffstat (limited to 'cmds/dumpstate/utils.cpp')
-rw-r--r--cmds/dumpstate/utils.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/cmds/dumpstate/utils.cpp b/cmds/dumpstate/utils.cpp
index d07ca8c37d..3fa2141cf1 100644
--- a/cmds/dumpstate/utils.cpp
+++ b/cmds/dumpstate/utils.cpp
@@ -737,7 +737,8 @@ int run_command_always(const char *title, bool drop_root, int timeout_seconds, c
execvp(command, (char**) args);
// execvp's result will be handled after waitpid_with_timeout() below...
- MYLOGD("execvp on command %s (plus args) returned control; calling _exit(-1)", command)
+ MYLOGD("execvp on command %s returned control (error: %s)", command, strerror(errno));
+ fflush(stdout);
_exit(-1); // ...but it doesn't hurt to force exit, just in case
}