summaryrefslogtreecommitdiff
path: root/cmds/dumpstate/utils.cpp
diff options
context:
space:
mode:
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 8129852a24..8c0e840050 100644
--- a/cmds/dumpstate/utils.cpp
+++ b/cmds/dumpstate/utils.cpp
@@ -746,7 +746,8 @@ int run_command_always(const char *title, bool drop_root, int timeout_seconds, c
// it's safer to exit dumpstate.
MYLOGD("execvp on command '%s' failed (error: %s)", command, strerror(errno));
fflush(stdout);
- exit(EXIT_FAILURE);
+ // Must call _exit (instead of exit), otherwise it will corrupt the zip file.
+ _exit(EXIT_FAILURE);
}
/* handle parent case */