Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1207)

Unified Diff: subprocess.cc

Issue 6880077: AU: Handle firmware update failure when booted from FW slot B. (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: Created 9 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « postinstall_runner_action_unittest.cc ('k') | update_attempter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: subprocess.cc
diff --git a/subprocess.cc b/subprocess.cc
old mode 100755
new mode 100644
index 9c1936708647d614e66eb81aad38bcde40a4bd60..f6c1e3dc3778993525d4afbda59feb93d72a9cfc
--- a/subprocess.cc
+++ b/subprocess.cc
@@ -29,14 +29,18 @@ void Subprocess::GChildExitedCallback(GPid pid, gint status, gpointer data) {
close(fd);
g_spawn_close_pid(pid);
+ gint use_status = status;
+ if (WIFEXITED(status))
+ use_status = WEXITSTATUS(status);
+
if (status) {
- LOG(INFO) << "Subprocess status: " << status;
+ LOG(INFO) << "Subprocess status: " << use_status;
}
if (!record->stdout.empty()) {
LOG(INFO) << "Subprocess output:\n" << record->stdout;
}
if (record->callback) {
- record->callback(status, record->stdout, record->callback_data);
+ record->callback(use_status, record->stdout, record->callback_data);
}
Get().subprocess_records_.erase(record->tag);
}
« no previous file with comments | « postinstall_runner_action_unittest.cc ('k') | update_attempter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698