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

Side by Side Diff: runtime/bin/process_win.cc

Issue 11091070: Change Process.start to return a future that completes with a (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Restructure to get rid of _onStart and _onError Created 8 years, 2 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 | Annotate | Revision Log
« no previous file with comments | « runtime/bin/process_impl.dart ('k') | tests/standalone/io/dart_std_io_pipe_test.dart » ('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 (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 #include <process.h> 5 #include <process.h>
6 6
7 #include "bin/builtin.h" 7 #include "bin/builtin.h"
8 #include "bin/process.h" 8 #include "bin/process.h"
9 #include "bin/eventhandler.h" 9 #include "bin/eventhandler.h"
10 #include "bin/thread.h" 10 #include "bin/thread.h"
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
508 HANDLE wait_handle; 508 HANDLE wait_handle;
509 HANDLE exit_pipe; 509 HANDLE exit_pipe;
510 bool success = ProcessInfoList::LookupProcess(id, 510 bool success = ProcessInfoList::LookupProcess(id,
511 &process_handle, 511 &process_handle,
512 &wait_handle, 512 &wait_handle,
513 &exit_pipe); 513 &exit_pipe);
514 if (!success) { 514 if (!success) {
515 return true; // The process has already died. Report a successful kill. 515 return true; // The process has already died. Report a successful kill.
516 } 516 }
517 BOOL result = TerminateProcess(process_handle, -1); 517 BOOL result = TerminateProcess(process_handle, -1);
518 if (!result) { 518 return result ? true : false;
519 return false;
520 }
521 return true;
522 } 519 }
523 520
524 521
525 void Process::TerminateExitCodeHandler() { 522 void Process::TerminateExitCodeHandler() {
526 // Nothing needs to be done on Windows. 523 // Nothing needs to be done on Windows.
527 } 524 }
528 525
529 526
530 intptr_t Process::CurrentProcessId() { 527 intptr_t Process::CurrentProcessId() {
531 return static_cast<intptr_t>(GetCurrentProcessId()); 528 return static_cast<intptr_t>(GetCurrentProcessId());
532 } 529 }
OLDNEW
« no previous file with comments | « runtime/bin/process_impl.dart ('k') | tests/standalone/io/dart_std_io_pipe_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698