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" | 5 #include "platform/globals.h" |
6 #if defined(HOST_OS_ANDROID) | 6 #if defined(HOST_OS_ANDROID) |
7 | 7 |
8 #include "bin/platform.h" | 8 #include "bin/platform.h" |
9 | 9 |
10 #include <signal.h> // NOLINT | 10 #include <signal.h> // NOLINT |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 result[current] = environ[current]; | 108 result[current] = environ[current]; |
109 } | 109 } |
110 return result; | 110 return result; |
111 } | 111 } |
112 | 112 |
113 const char* Platform::GetExecutableName() { | 113 const char* Platform::GetExecutableName() { |
114 return executable_name_; | 114 return executable_name_; |
115 } | 115 } |
116 | 116 |
117 const char* Platform::ResolveExecutablePath() { | 117 const char* Platform::ResolveExecutablePath() { |
118 return NULL; | 118 return File::ReadLink("/proc/self/exe"); |
119 } | 119 } |
120 | 120 |
121 void Platform::Exit(int exit_code) { | 121 void Platform::Exit(int exit_code) { |
122 exit(exit_code); | 122 exit(exit_code); |
123 } | 123 } |
124 | 124 |
125 } // namespace bin | 125 } // namespace bin |
126 } // namespace dart | 126 } // namespace dart |
127 | 127 |
128 #endif // defined(HOST_OS_ANDROID) | 128 #endif // defined(HOST_OS_ANDROID) |
OLD | NEW |