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

Side by Side Diff: subprocess.cc

Issue 4114006: AU: locate bsdiff/bspatch in $PATH, rather than hard coding their location. (Closed) Base URL: http://git.chromium.org/git/update_engine.git@master
Patch Set: fix for review Created 10 years, 1 month 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « delta_diff_generator.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2009 The Chromium OS Authors. All rights reserved. 1 // Copyright (c) 2009 The Chromium OS 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 <unistd.h> 9 #include <unistd.h>
10 #include <vector> 10 #include <vector>
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 return false; 155 return false;
156 } 156 }
157 ScopedFreeArgPointer argp_free(argp); 157 ScopedFreeArgPointer argp_free(argp);
158 158
159 char* child_stdout; 159 char* child_stdout;
160 160
161 bool success = g_spawn_sync( 161 bool success = g_spawn_sync(
162 NULL, // working directory 162 NULL, // working directory
163 argv.get(), 163 argv.get(),
164 argp, 164 argp,
165 static_cast<GSpawnFlags>(G_SPAWN_STDERR_TO_DEV_NULL | flags), // flags 165 static_cast<GSpawnFlags>(G_SPAWN_STDERR_TO_DEV_NULL |
166 G_SPAWN_SEARCH_PATH | flags), // flags
166 GRedirectStderrToStdout, // child setup function 167 GRedirectStderrToStdout, // child setup function
167 NULL, // data for child setup function 168 NULL, // data for child setup function
168 &child_stdout, 169 &child_stdout,
169 NULL, 170 NULL,
170 return_code, 171 return_code,
171 &err); 172 &err);
172 FreeArgv(argv.get()); 173 FreeArgv(argv.get());
173 if (err) 174 if (err)
174 LOG(INFO) << "err is: " << err->code << ", " << err->message; 175 LOG(INFO) << "err is: " << err->code << ", " << err->message;
175 if (child_stdout && strlen(child_stdout)) 176 if (child_stdout && strlen(child_stdout))
176 LOG(INFO) << "Subprocess output:\n" << child_stdout; 177 LOG(INFO) << "Subprocess output:\n" << child_stdout;
177 return success; 178 return success;
178 } 179 }
179 180
180 Subprocess* Subprocess::subprocess_singleton_ = NULL; 181 Subprocess* Subprocess::subprocess_singleton_ = NULL;
181 182
182 } // namespace chromeos_update_engine 183 } // namespace chromeos_update_engine
OLDNEW
« no previous file with comments | « delta_diff_generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698