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 #ifndef RUNTIME_BIN_PROCESS_H_ | 5 #ifndef RUNTIME_BIN_PROCESS_H_ |
6 #define RUNTIME_BIN_PROCESS_H_ | 6 #define RUNTIME_BIN_PROCESS_H_ |
7 | 7 |
8 #include <errno.h> | 8 #include <errno.h> |
9 | 9 |
10 #include "bin/builtin.h" | 10 #include "bin/builtin.h" |
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
66 kSigtstp = 20, | 66 kSigtstp = 20, |
67 kSigttin = 21, | 67 kSigttin = 21, |
68 kSigttou = 22, | 68 kSigttou = 22, |
69 kSigurg = 23, | 69 kSigurg = 23, |
70 kSigxcpu = 24, | 70 kSigxcpu = 24, |
71 kSigxfsz = 25, | 71 kSigxfsz = 25, |
72 kSigvtalrm = 26, | 72 kSigvtalrm = 26, |
73 kSigprof = 27, | 73 kSigprof = 27, |
74 kSigwinch = 28, | 74 kSigwinch = 28, |
75 kSigpoll = 29, | 75 kSigpoll = 29, |
76 kSigsys = 31 | 76 kSigsys = 31, |
| 77 kLastSignal = kSigsys, |
77 }; | 78 }; |
78 | 79 |
79 | 80 |
80 // To be kept in sync with ProcessStartMode consts in sdk/lib/io/process.dart. | 81 // To be kept in sync with ProcessStartMode consts in sdk/lib/io/process.dart. |
81 enum ProcessStartMode { | 82 enum ProcessStartMode { |
82 kNormal = 0, | 83 kNormal = 0, |
83 kDetached = 1, | 84 kDetached = 1, |
84 kDetachedWithStdio = 2, | 85 kDetachedWithStdio = 2, |
85 }; | 86 }; |
86 | 87 |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 static void RunExitHook(int64_t exit_code) { | 133 static void RunExitHook(int64_t exit_code) { |
133 if (exit_hook_ != NULL) { | 134 if (exit_hook_ != NULL) { |
134 exit_hook_(exit_code); | 135 exit_hook_(exit_code); |
135 } | 136 } |
136 } | 137 } |
137 | 138 |
138 static intptr_t CurrentProcessId(); | 139 static intptr_t CurrentProcessId(); |
139 | 140 |
140 static intptr_t SetSignalHandler(intptr_t signal); | 141 static intptr_t SetSignalHandler(intptr_t signal); |
141 static void ClearSignalHandler(intptr_t signal); | 142 static void ClearSignalHandler(intptr_t signal); |
| 143 static void ClearAllSignalHandlers(); |
142 | 144 |
143 static Dart_Handle GetProcessIdNativeField(Dart_Handle process, | 145 static Dart_Handle GetProcessIdNativeField(Dart_Handle process, |
144 intptr_t* pid); | 146 intptr_t* pid); |
145 static Dart_Handle SetProcessIdNativeField(Dart_Handle process, intptr_t pid); | 147 static Dart_Handle SetProcessIdNativeField(Dart_Handle process, intptr_t pid); |
146 | 148 |
147 private: | 149 private: |
148 static int global_exit_code_; | 150 static int global_exit_code_; |
149 static Mutex* global_exit_code_mutex_; | 151 static Mutex* global_exit_code_mutex_; |
150 static ExitHook exit_hook_; | 152 static ExitHook exit_hook_; |
151 | 153 |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
359 | 361 |
360 private: | 362 private: |
361 DISALLOW_COPY_AND_ASSIGN(BufferList); | 363 DISALLOW_COPY_AND_ASSIGN(BufferList); |
362 }; | 364 }; |
363 #endif // defined(HOST_OS_ANDROID) ... | 365 #endif // defined(HOST_OS_ANDROID) ... |
364 | 366 |
365 } // namespace bin | 367 } // namespace bin |
366 } // namespace dart | 368 } // namespace dart |
367 | 369 |
368 #endif // RUNTIME_BIN_PROCESS_H_ | 370 #endif // RUNTIME_BIN_PROCESS_H_ |
OLD | NEW |