summaryrefslogtreecommitdiffstats
path: root/recovery.cpp
diff options
context:
space:
mode:
authorTao Bao <tbao@google.com>2017-02-03 22:09:23 +0100
committerTao Bao <tbao@google.com>2017-02-03 23:11:11 +0100
commit3da880156b4a56a6af5065ac10dfd6833cdcb1d4 (patch)
tree9f4ecbd604bd914dbc0725b3babc7781f5ec8957 /recovery.cpp
parentMerge "Avoid to call UI functions in child process" (diff)
downloadandroid_bootable_recovery-3da880156b4a56a6af5065ac10dfd6833cdcb1d4.tar
android_bootable_recovery-3da880156b4a56a6af5065ac10dfd6833cdcb1d4.tar.gz
android_bootable_recovery-3da880156b4a56a6af5065ac10dfd6833cdcb1d4.tar.bz2
android_bootable_recovery-3da880156b4a56a6af5065ac10dfd6833cdcb1d4.tar.lz
android_bootable_recovery-3da880156b4a56a6af5065ac10dfd6833cdcb1d4.tar.xz
android_bootable_recovery-3da880156b4a56a6af5065ac10dfd6833cdcb1d4.tar.zst
android_bootable_recovery-3da880156b4a56a6af5065ac10dfd6833cdcb1d4.zip
Diffstat (limited to '')
-rw-r--r--recovery.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/recovery.cpp b/recovery.cpp
index 25d3546e3..29d7ab889 100644
--- a/recovery.cpp
+++ b/recovery.cpp
@@ -243,7 +243,7 @@ static void redirect_stdio(const char* filename) {
if (log_fp == nullptr) {
PLOG(ERROR) << "fopen \"" << filename << "\" failed";
close(pipefd[0]);
- _exit(1);
+ _exit(EXIT_FAILURE);
}
FILE* pipe_fp = fdopen(pipefd[0], "r");
@@ -251,7 +251,7 @@ static void redirect_stdio(const char* filename) {
PLOG(ERROR) << "fdopen failed";
check_and_fclose(log_fp, filename);
close(pipefd[0]);
- _exit(1);
+ _exit(EXIT_FAILURE);
}
char* line = nullptr;
@@ -273,7 +273,7 @@ static void redirect_stdio(const char* filename) {
free(line);
check_and_fclose(log_fp, filename);
close(pipefd[0]);
- _exit(1);
+ _exit(EXIT_FAILURE);
} else {
// Redirect stdout/stderr to the logger process.
// Close the unused read end.