summaryrefslogtreecommitdiffstats
path: root/recovery.cpp
diff options
context:
space:
mode:
authorTreehugger Robot <treehugger-gerrit@google.com>2017-02-04 00:40:06 +0100
committerGerrit Code Review <noreply-gerritcodereview@google.com>2017-02-04 00:40:06 +0100
commit95bcbfdd4e96cc89791e8fa907a508ace339c4c1 (patch)
tree9f4ecbd604bd914dbc0725b3babc7781f5ec8957 /recovery.cpp
parentMerge "Avoid to call UI functions in child process" (diff)
parentReplace _exit(-1) with _exit(EXIT_FAILURE). (diff)
downloadandroid_bootable_recovery-95bcbfdd4e96cc89791e8fa907a508ace339c4c1.tar
android_bootable_recovery-95bcbfdd4e96cc89791e8fa907a508ace339c4c1.tar.gz
android_bootable_recovery-95bcbfdd4e96cc89791e8fa907a508ace339c4c1.tar.bz2
android_bootable_recovery-95bcbfdd4e96cc89791e8fa907a508ace339c4c1.tar.lz
android_bootable_recovery-95bcbfdd4e96cc89791e8fa907a508ace339c4c1.tar.xz
android_bootable_recovery-95bcbfdd4e96cc89791e8fa907a508ace339c4c1.tar.zst
android_bootable_recovery-95bcbfdd4e96cc89791e8fa907a508ace339c4c1.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.