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:
Tao Bao
2017-02-03 14:11:11 -08:00
parent 0f275ae56e
commit 3da880156b
6 changed files with 9 additions and 9 deletions
+1 -1
View File
@@ -163,7 +163,7 @@ static int exec_cmd(const char* path, char* const argv[]) {
pid_t child;
if ((child = vfork()) == 0) {
execv(path, argv);
_exit(-1);
_exit(EXIT_FAILURE);
}
waitpid(child, &status, 0);
if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {