Replace _exit(-1) with _exit(EXIT_FAILURE).
-1 is not a valid exit status. Also replace a few exit(1) with exit(EXIT_FAILURE). Test: mmma bootable/recovery Change-Id: I4596c8328b770bf95acccc06a4401bd5cabd4bfd
This commit is contained in:
+3
-3
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user