diff options
author | Treehugger Robot <treehugger-gerrit@google.com> | 2018-11-08 23:57:47 +0100 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2018-11-08 23:57:47 +0100 |
commit | 02a945556e45e6e1711b260907f8ac22255ecc2c (patch) | |
tree | 8e80f33d4570935a3786a4c811241810fd801b01 /install.cpp | |
parent | Merge "minui: GRSurface manages data with std::unique_ptr." (diff) | |
parent | Check and dump the signal info for killed updater. (diff) | |
download | android_bootable_recovery-02a945556e45e6e1711b260907f8ac22255ecc2c.tar android_bootable_recovery-02a945556e45e6e1711b260907f8ac22255ecc2c.tar.gz android_bootable_recovery-02a945556e45e6e1711b260907f8ac22255ecc2c.tar.bz2 android_bootable_recovery-02a945556e45e6e1711b260907f8ac22255ecc2c.tar.lz android_bootable_recovery-02a945556e45e6e1711b260907f8ac22255ecc2c.tar.xz android_bootable_recovery-02a945556e45e6e1711b260907f8ac22255ecc2c.tar.zst android_bootable_recovery-02a945556e45e6e1711b260907f8ac22255ecc2c.zip |
Diffstat (limited to '')
-rw-r--r-- | install.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/install.cpp b/install.cpp index e1e8ee879..680937dd1 100644 --- a/install.cpp +++ b/install.cpp @@ -497,9 +497,16 @@ static int try_update_binary(const std::string& package, ZipArchiveHandle zip, b if (retry_update) { return INSTALL_RETRY; } - if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { - LOG(ERROR) << "Error in " << package << " (Status " << WEXITSTATUS(status) << ")"; + if (WIFEXITED(status)) { + if (WEXITSTATUS(status) != EXIT_SUCCESS) { + LOG(ERROR) << "Error in " << package << " (status " << WEXITSTATUS(status) << ")"; + return INSTALL_ERROR; + } + } else if (WIFSIGNALED(status)) { + LOG(ERROR) << "Error in " << package << " (killed by signal " << WTERMSIG(status) << ")"; return INSTALL_ERROR; + } else { + LOG(FATAL) << "Invalid status code " << status; } return INSTALL_SUCCESS; |