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

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

Issue 2629623003: Win should call ::TerminateProcess to exit a renderer process (Closed)
Patch Set: temp Created 3 years, 10 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
« no previous file with comments | « base/process/process.h ('k') | base/process/process_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/process.h" 5 #include "base/process/process.h"
6 6
7 #include <errno.h> 7 #include <errno.h>
8 #include <stdint.h> 8 #include <stdint.h>
9 #include <sys/resource.h> 9 #include <sys/resource.h>
10 #include <sys/wait.h> 10 #include <sys/wait.h>
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
257 return Process(handle); 257 return Process(handle);
258 } 258 }
259 259
260 #if !defined(OS_LINUX) && !defined(OS_MACOSX) 260 #if !defined(OS_LINUX) && !defined(OS_MACOSX)
261 // static 261 // static
262 bool Process::CanBackgroundProcesses() { 262 bool Process::CanBackgroundProcesses() {
263 return false; 263 return false;
264 } 264 }
265 #endif // !defined(OS_LINUX) && !defined(OS_MACOSX) 265 #endif // !defined(OS_LINUX) && !defined(OS_MACOSX)
266 266
267 // static
268 void Process::TerminateCurrentProcessImmediately(int exit_code) {
269 _exit(exit_code);
270 }
271
267 bool Process::IsValid() const { 272 bool Process::IsValid() const {
268 return process_ != kNullProcessHandle; 273 return process_ != kNullProcessHandle;
269 } 274 }
270 275
271 ProcessHandle Process::Handle() const { 276 ProcessHandle Process::Handle() const {
272 return process_; 277 return process_;
273 } 278 }
274 279
275 Process Process::Duplicate() const { 280 Process Process::Duplicate() const {
276 if (is_current()) 281 if (is_current())
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
376 return false; 381 return false;
377 } 382 }
378 #endif // !defined(OS_LINUX) && !defined(OS_MACOSX) 383 #endif // !defined(OS_LINUX) && !defined(OS_MACOSX)
379 384
380 int Process::GetPriority() const { 385 int Process::GetPriority() const {
381 DCHECK(IsValid()); 386 DCHECK(IsValid());
382 return getpriority(PRIO_PROCESS, process_); 387 return getpriority(PRIO_PROCESS, process_);
383 } 388 }
384 389
385 } // namespace base 390 } // namespace base
OLDNEW
« no previous file with comments | « base/process/process.h ('k') | base/process/process_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698