summaryrefslogtreecommitdiffstats
path: root/install.cpp
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2018-11-11 05:08:45 +0100
committerandroid-build-team Robot <android-build-team-robot@google.com>2018-11-11 05:08:45 +0100
commit2a4f016c4b062ce8f5955b77a9153b0e9587089f (patch)
tree2700cccf121a9199e94ea8c789d06aac5e49bde9 /install.cpp
parentSnap for 5115169 from cf2a142c4370c023eb62f86fb193e1c6b1d62b02 to qt-release (diff)
parentMerge "Check and dump the signal info for killed updater." am: 02a945556e am: d409598e08 (diff)
downloadandroid_bootable_recovery-2a4f016c4b062ce8f5955b77a9153b0e9587089f.tar
android_bootable_recovery-2a4f016c4b062ce8f5955b77a9153b0e9587089f.tar.gz
android_bootable_recovery-2a4f016c4b062ce8f5955b77a9153b0e9587089f.tar.bz2
android_bootable_recovery-2a4f016c4b062ce8f5955b77a9153b0e9587089f.tar.lz
android_bootable_recovery-2a4f016c4b062ce8f5955b77a9153b0e9587089f.tar.xz
android_bootable_recovery-2a4f016c4b062ce8f5955b77a9153b0e9587089f.tar.zst
android_bootable_recovery-2a4f016c4b062ce8f5955b77a9153b0e9587089f.zip
Diffstat (limited to 'install.cpp')
-rw-r--r--install.cpp11
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;