| Index: runtime/bin/process_macos.cc
|
| diff --git a/runtime/bin/process_macos.cc b/runtime/bin/process_macos.cc
|
| index 0022a8b6cdde8c3c433058226ac12342e3851cdb..43dcc285ecf23488e701b2bf59b7f3a0adf330f3 100644
|
| --- a/runtime/bin/process_macos.cc
|
| +++ b/runtime/bin/process_macos.cc
|
| @@ -532,6 +532,14 @@ int Process::Start(const char* path,
|
| VOID_TEMP_FAILURE_RETRY(close(read_err[1]));
|
| VOID_TEMP_FAILURE_RETRY(close(write_out[0]));
|
| VOID_TEMP_FAILURE_RETRY(close(write_out[1]));
|
| +
|
| + // Since exec() failed, we're not interested in the exit code.
|
| + // We close the reading side of the exit code pipe here.
|
| + // GetProcessExitCodes will get a broken pipe error when it tries to write
|
| + // to the writing side of the pipe and it will ignore the error.
|
| + VOID_TEMP_FAILURE_RETRY(close(*exit_event));
|
| + *exit_event = -1;
|
| +
|
| if (bytes_read == -1) {
|
| return errno; // Read failed.
|
| } else {
|
|
|