diff options
author | Vojtech Bocek <vbocek@gmail.com> | 2015-03-20 15:36:40 +0100 |
---|---|---|
committer | Dees Troy <dees_troy@teamw.in> | 2015-03-20 21:16:03 +0100 |
commit | 0fdcbec65af8d837f8074a9c120851f4e46a3b5d (patch) | |
tree | 817310701619e15380d84da173690283aee6e597 | |
parent | libtar: fix handling of files bigger than 2 GiB (diff) | |
download | android_bootable_recovery-0fdcbec65af8d837f8074a9c120851f4e46a3b5d.tar android_bootable_recovery-0fdcbec65af8d837f8074a9c120851f4e46a3b5d.tar.gz android_bootable_recovery-0fdcbec65af8d837f8074a9c120851f4e46a3b5d.tar.bz2 android_bootable_recovery-0fdcbec65af8d837f8074a9c120851f4e46a3b5d.tar.lz android_bootable_recovery-0fdcbec65af8d837f8074a9c120851f4e46a3b5d.tar.xz android_bootable_recovery-0fdcbec65af8d837f8074a9c120851f4e46a3b5d.tar.zst android_bootable_recovery-0fdcbec65af8d837f8074a9c120851f4e46a3b5d.zip |
-rw-r--r-- | twrp-functions.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/twrp-functions.cpp b/twrp-functions.cpp index e6961e288..c396a07fd 100644 --- a/twrp-functions.cpp +++ b/twrp-functions.cpp @@ -126,12 +126,12 @@ int TWFunc::Wait_For_Child(pid_t pid, int *status, string Child_Name) { rc_pid = waitpid(pid, status, 0); if (rc_pid > 0) { - if (WEXITSTATUS(*status) == 0) - LOGINFO("%s process ended with RC=%d\n", Child_Name.c_str(), WEXITSTATUS(*status)); // Success - else if (WIFSIGNALED(*status)) { + if (WIFSIGNALED(*status)) { LOGINFO("%s process ended with signal: %d\n", Child_Name.c_str(), WTERMSIG(*status)); // Seg fault or some other non-graceful termination return -1; - } else if (WEXITSTATUS(*status) != 0) { + } else if (WEXITSTATUS(*status) == 0) { + LOGINFO("%s process ended with RC=%d\n", Child_Name.c_str(), WEXITSTATUS(*status)); // Success + } else { LOGINFO("%s process ended with ERROR=%d\n", Child_Name.c_str(), WEXITSTATUS(*status)); // Graceful exit, but there was an error return -1; } |