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 #include "platform/globals.h" |
| 6 #if defined(TARGET_OS_MACOS) |
| 7 |
5 #include "bin/process.h" | 8 #include "bin/process.h" |
6 | 9 |
7 #include <errno.h> | 10 #include <errno.h> // NOLINT |
8 #include <fcntl.h> | 11 #include <fcntl.h> // NOLINT |
9 #include <poll.h> | 12 #include <poll.h> // NOLINT |
10 #include <signal.h> | 13 #include <signal.h> // NOLINT |
11 #include <stdio.h> | 14 #include <stdio.h> // NOLINT |
12 #include <stdlib.h> | 15 #include <stdlib.h> // NOLINT |
13 #include <string.h> | 16 #include <string.h> // NOLINT |
14 #include <unistd.h> | 17 #include <unistd.h> // NOLINT |
15 | 18 |
16 #include "bin/fdutils.h" | 19 #include "bin/fdutils.h" |
17 #include "bin/log.h" | 20 #include "bin/log.h" |
18 #include "bin/thread.h" | 21 #include "bin/thread.h" |
19 | 22 |
20 extern char **environ; | 23 extern char **environ; |
21 | 24 |
22 // ProcessInfo is used to map a process id to the file descriptor for | 25 // ProcessInfo is used to map a process id to the file descriptor for |
23 // the pipe used to communicate the exit code of the process to Dart. | 26 // the pipe used to communicate the exit code of the process to Dart. |
24 // ProcessInfo objects are kept in the static singly-linked | 27 // ProcessInfo objects are kept in the static singly-linked |
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
553 | 556 |
554 | 557 |
555 void Process::TerminateExitCodeHandler() { | 558 void Process::TerminateExitCodeHandler() { |
556 ExitCodeHandler::TerminateExitCodeThread(); | 559 ExitCodeHandler::TerminateExitCodeThread(); |
557 } | 560 } |
558 | 561 |
559 | 562 |
560 intptr_t Process::CurrentProcessId() { | 563 intptr_t Process::CurrentProcessId() { |
561 return static_cast<intptr_t>(getpid()); | 564 return static_cast<intptr_t>(getpid()); |
562 } | 565 } |
| 566 |
| 567 #endif // defined(TARGET_OS_MACOS) |
OLD | NEW |