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

Side by Side Diff: base/process/launch_win.cc

Issue 1124763003: Update from https://crrev.com/327068 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: update nacl, buildtools, fix display_change_notifier_unittest Created 5 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "base/process/launch.h" 5 #include "base/process/launch.h"
6 6
7 #include <fcntl.h> 7 #include <fcntl.h>
8 #include <io.h> 8 #include <io.h>
9 #include <shellapi.h> 9 #include <shellapi.h>
10 #include <windows.h> 10 #include <windows.h>
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 << std::endl;; 212 << std::endl;;
213 return Process(); 213 return Process();
214 } 214 }
215 } 215 }
216 base::win::ScopedProcessInformation process_info(temp_process_info); 216 base::win::ScopedProcessInformation process_info(temp_process_info);
217 217
218 if (options.job_handle) { 218 if (options.job_handle) {
219 if (0 == AssignProcessToJobObject(options.job_handle, 219 if (0 == AssignProcessToJobObject(options.job_handle,
220 process_info.process_handle())) { 220 process_info.process_handle())) {
221 DLOG(ERROR) << "Could not AssignProcessToObject."; 221 DLOG(ERROR) << "Could not AssignProcessToObject.";
222 KillProcess(process_info.process_handle(), kProcessKilledExitCode, true); 222 Process scoped_process(process_info.TakeProcessHandle());
223 scoped_process.Terminate(kProcessKilledExitCode, true);
223 return Process(); 224 return Process();
224 } 225 }
225 226
226 ResumeThread(process_info.thread_handle()); 227 ResumeThread(process_info.thread_handle());
227 } 228 }
228 229
229 if (options.wait) 230 if (options.wait)
230 WaitForSingleObject(process_info.process_handle(), INFINITE); 231 WaitForSingleObject(process_info.process_handle(), INFINITE);
231 232
232 return Process(process_info.TakeProcessHandle()); 233 return Process(process_info.TakeProcessHandle());
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after
343 WaitForSingleObject(proc_info.process_handle(), INFINITE); 344 WaitForSingleObject(proc_info.process_handle(), INFINITE);
344 345
345 return true; 346 return true;
346 } 347 }
347 348
348 void RaiseProcessToHighPriority() { 349 void RaiseProcessToHighPriority() {
349 SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS); 350 SetPriorityClass(GetCurrentProcess(), HIGH_PRIORITY_CLASS);
350 } 351 }
351 352
352 } // namespace base 353 } // namespace base
OLDNEW
« no previous file with comments | « base/process/kill_win.cc ('k') | base/process/memory.h » ('j') | mojo/public/tools/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698