Skip to content

Commit

Permalink
Revert and fix more of the mac change.
Browse files Browse the repository at this point in the history
  • Loading branch information
Anders Johnsen committed Jun 10, 2015
1 parent 265a544 commit ed72caa
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
18 changes: 9 additions & 9 deletions runtime/bin/process_macos.cc
Expand Up @@ -452,7 +452,10 @@ class ProcessStarter {
}

if (program_environment_ != NULL) {
environ = program_environment_;
// On MacOS you have to do a bit of magic to get to the
// environment strings.
char*** environ = _NSGetEnviron();
*environ = program_environment_;
}

VOID_TEMP_FAILURE_RETRY(
Expand Down Expand Up @@ -653,10 +656,7 @@ class ProcessStarter {


void SetChildOsErrorMessage() {
const int kBufferSize = 1024;
char error_message[kBufferSize];
strerror_r(errno, error_message, kBufferSize);
*os_error_message_ = strdup(error_message);
SetOSErrorMessage(errno);
}


Expand All @@ -681,10 +681,10 @@ class ProcessStarter {


void SetOSErrorMessage(int child_errno) {
const int kMaxMessageSize = 256;
char* message = static_cast<char*>(calloc(kMaxMessageSize, 0));
strerror_r(child_errno, message, kMaxMessageSize - 1);
*os_error_message_ = message;
const int kBufferSize = 1024;
char error_message[kBufferSize];
strerror_r(child_errno, error_message, kBufferSize);
*os_error_message_ = strdup(error_message);
}


Expand Down
1 change: 1 addition & 0 deletions tests/standalone/standalone.status
Expand Up @@ -42,6 +42,7 @@ io/directory_fuzz_test: Skip
# This is expected as MacOS by default runs with a very low number
# of allowed open files ('ulimit -n' says something like 256).
io/socket_many_connections_test: Skip
io/platform_executable_test/06: RuntimeError

[ $compiler == none && ($runtime == drt || $runtime == dartium || $runtime == ContentShellOnAndroid) ]
typed_array_test: Fail # Issue 13921
Expand Down

0 comments on commit ed72caa

Please sign in to comment.