OLD | NEW |
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 #if !defined(DART_IO_DISABLED) |
| 6 |
5 #include "platform/globals.h" | 7 #include "platform/globals.h" |
6 #if defined(TARGET_OS_WINDOWS) | 8 #if defined(TARGET_OS_WINDOWS) |
7 | 9 |
8 #include "bin/process.h" | 10 #include "bin/process.h" |
9 | 11 |
10 #include <process.h> // NOLINT | 12 #include <process.h> // NOLINT |
11 | 13 |
12 #include "bin/builtin.h" | 14 #include "bin/builtin.h" |
13 #include "bin/dartutils.h" | 15 #include "bin/dartutils.h" |
14 #include "bin/eventhandler.h" | 16 #include "bin/eventhandler.h" |
15 #include "bin/lockers.h" | 17 #include "bin/lockers.h" |
16 #include "bin/log.h" | 18 #include "bin/log.h" |
17 #include "bin/socket.h" | 19 #include "bin/socket.h" |
18 #include "bin/thread.h" | 20 #include "bin/thread.h" |
19 #include "bin/utils.h" | 21 #include "bin/utils.h" |
20 #include "bin/utils_win.h" | 22 #include "bin/utils_win.h" |
21 | 23 |
22 namespace dart { | 24 namespace dart { |
23 namespace bin { | 25 namespace bin { |
24 | 26 |
25 static const int kReadHandle = 0; | 27 static const int kReadHandle = 0; |
26 static const int kWriteHandle = 1; | 28 static const int kWriteHandle = 1; |
27 | 29 |
| 30 int Process::global_exit_code_ = 0; |
| 31 Mutex* Process::global_exit_code_mutex_ = new Mutex(); |
28 | 32 |
29 // ProcessInfo is used to map a process id to the process handle, | 33 // ProcessInfo is used to map a process id to the process handle, |
30 // wait handle for registered exit code event and the pipe used to | 34 // wait handle for registered exit code event and the pipe used to |
31 // communicate the exit code of the process to Dart. | 35 // communicate the exit code of the process to Dart. |
32 // ProcessInfo objects are kept in the static singly-linked | 36 // ProcessInfo objects are kept in the static singly-linked |
33 // ProcessInfoList. | 37 // ProcessInfoList. |
34 class ProcessInfo { | 38 class ProcessInfo { |
35 public: | 39 public: |
36 ProcessInfo(DWORD process_id, | 40 ProcessInfo(DWORD process_id, |
37 HANDLE process_handle, | 41 HANDLE process_handle, |
(...skipping 1037 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1075 USE(SetConsoleCtrlHandler(SignalHandler, false)); | 1079 USE(SetConsoleCtrlHandler(SignalHandler, false)); |
1076 } | 1080 } |
1077 } | 1081 } |
1078 delete handler; | 1082 delete handler; |
1079 } | 1083 } |
1080 | 1084 |
1081 } // namespace bin | 1085 } // namespace bin |
1082 } // namespace dart | 1086 } // namespace dart |
1083 | 1087 |
1084 #endif // defined(TARGET_OS_WINDOWS) | 1088 #endif // defined(TARGET_OS_WINDOWS) |
| 1089 |
| 1090 #endif // !defined(DART_IO_DISABLED) |
OLD | NEW |