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_ANDROID) |
| 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 <sys/wait.h> | 17 #include <sys/wait.h> // NOLINT |
15 #include <unistd.h> | 18 #include <unistd.h> // NOLINT |
16 | 19 |
17 #include "bin/fdutils.h" | 20 #include "bin/fdutils.h" |
18 #include "bin/log.h" | 21 #include "bin/log.h" |
19 #include "bin/thread.h" | 22 #include "bin/thread.h" |
20 | 23 |
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 |
25 // ProcessInfoList. | 28 // ProcessInfoList. |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
559 | 562 |
560 | 563 |
561 void Process::TerminateExitCodeHandler() { | 564 void Process::TerminateExitCodeHandler() { |
562 ExitCodeHandler::TerminateExitCodeThread(); | 565 ExitCodeHandler::TerminateExitCodeThread(); |
563 } | 566 } |
564 | 567 |
565 | 568 |
566 intptr_t Process::CurrentProcessId() { | 569 intptr_t Process::CurrentProcessId() { |
567 return static_cast<intptr_t>(getpid()); | 570 return static_cast<intptr_t>(getpid()); |
568 } | 571 } |
| 572 |
| 573 #endif // defined(TARGET_OS_ANDROID) |
OLD | NEW |