Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(542)

Side by Side Diff: runtime/bin/platform_android.cc

Issue 1839463002: Really remove io support when dart:io is unsupported. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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(TARGET_OS_ANDROID) 6 #if defined(TARGET_OS_ANDROID)
7 7
8 #include "bin/file.h"
9 #include "bin/platform.h" 8 #include "bin/platform.h"
10 9
11 #include <signal.h> // NOLINT 10 #include <signal.h> // NOLINT
12 #include <string.h> // NOLINT 11 #include <string.h> // NOLINT
13 #include <unistd.h> // NOLINT 12 #include <unistd.h> // NOLINT
14 13
15 #include "bin/fdutils.h" 14 #include "bin/fdutils.h"
15 #include "bin/file.h"
16 16
17 namespace dart { 17 namespace dart {
18 namespace bin { 18 namespace bin {
19 19
20 const char* Platform::executable_name_ = NULL;
21 char* Platform::resolved_executable_name_ = NULL;
22 int Platform::script_index_ = 1;
23 char** Platform::argv_ = NULL;
24
20 bool Platform::Initialize() { 25 bool Platform::Initialize() {
21 // Turn off the signal handler for SIGPIPE as it causes the process 26 // Turn off the signal handler for SIGPIPE as it causes the process
22 // to terminate on writing to a closed pipe. Without the signal 27 // to terminate on writing to a closed pipe. Without the signal
23 // handler error EPIPE is set instead. 28 // handler error EPIPE is set instead.
24 struct sigaction act; 29 struct sigaction act;
25 bzero(&act, sizeof(act)); 30 bzero(&act, sizeof(act));
26 act.sa_handler = SIG_IGN; 31 act.sa_handler = SIG_IGN;
27 if (sigaction(SIGPIPE, &act, 0) != 0) { 32 if (sigaction(SIGPIPE, &act, 0) != 0) {
28 perror("Setting signal handler failed"); 33 perror("Setting signal handler failed");
29 return false; 34 return false;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
76 81
77 82
78 void Platform::Exit(int exit_code) { 83 void Platform::Exit(int exit_code) {
79 exit(exit_code); 84 exit(exit_code);
80 } 85 }
81 86
82 } // namespace bin 87 } // namespace bin
83 } // namespace dart 88 } // namespace dart
84 89
85 #endif // defined(TARGET_OS_ANDROID) 90 #endif // defined(TARGET_OS_ANDROID)
OLDNEW
« no previous file with comments | « runtime/bin/platform.cc ('k') | runtime/bin/platform_linux.cc » ('j') | runtime/bin/socket.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698