| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "update_engine/subprocess.h" | 5 #include "update_engine/subprocess.h" |
| 6 #include <stdlib.h> | 6 #include <stdlib.h> |
| 7 #include <string.h> | 7 #include <string.h> |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 static_cast<GSpawnFlags>(NULL), // flags | 132 static_cast<GSpawnFlags>(NULL), // flags |
| 133 NULL, // child setup function | 133 NULL, // child setup function |
| 134 NULL, // data for child setup function | 134 NULL, // data for child setup function |
| 135 &child_stdout, | 135 &child_stdout, |
| 136 &child_stderr, | 136 &child_stderr, |
| 137 return_code, | 137 return_code, |
| 138 &err); | 138 &err); |
| 139 FreeArgv(argv.get()); | 139 FreeArgv(argv.get()); |
| 140 if (err) | 140 if (err) |
| 141 LOG(INFO) << "err is: " << err->code << ", " << err->message; | 141 LOG(INFO) << "err is: " << err->code << ", " << err->message; |
| 142 if (child_stdout) | 142 if (child_stdout && strlen(child_stdout)) |
| 143 LOG(INFO) << "Postinst stdout:" << child_stdout; | 143 LOG(INFO) << "Subprocess stdout:" << child_stdout; |
| 144 if (child_stderr) | 144 if (child_stderr && strlen(child_stderr)) |
| 145 LOG(INFO) << "Postinst stderr:" << child_stderr; | 145 LOG(INFO) << "Subprocess stderr:" << child_stderr; |
| 146 return success; | 146 return success; |
| 147 } | 147 } |
| 148 | 148 |
| 149 Subprocess* Subprocess::subprocess_singleton_ = NULL; | 149 Subprocess* Subprocess::subprocess_singleton_ = NULL; |
| 150 | 150 |
| 151 } // namespace chromeos_update_engine | 151 } // namespace chromeos_update_engine |
| OLD | NEW |