Index: runtime/bin/process_linux.cc |
diff --git a/runtime/bin/process_linux.cc b/runtime/bin/process_linux.cc |
index 844d09e4659a3005c66e9e5055e716cb91ac5474..c41b808afe6379ac9a1bbc3ac114c864cb91fcab 100644 |
--- a/runtime/bin/process_linux.cc |
+++ b/runtime/bin/process_linux.cc |
@@ -674,11 +674,6 @@ intptr_t Process::SetSignalHandler(intptr_t signal) { |
if (pipe(fds) != 0) { |
return -1; |
} |
- if (!FDUtils::SetNonBlocking(fds[0])) { |
- VOID_TEMP_FAILURE_RETRY(close(fds[0])); |
- VOID_TEMP_FAILURE_RETRY(close(fds[1])); |
- return -1; |
- } |
ThreadSignalBlocker blocker(kSignalsCount, kSignals); |
MutexLocker lock(signal_mutex); |
SignalInfo* handler = signal_handlers; |
@@ -700,8 +695,10 @@ intptr_t Process::SetSignalHandler(intptr_t signal) { |
} |
int status = sigaction(signal, &act, NULL); |
if (status < 0) { |
+ int err = errno; |
VOID_TEMP_FAILURE_RETRY(close(fds[0])); |
VOID_TEMP_FAILURE_RETRY(close(fds[1])); |
+ errno = err; |
return -1; |
} |
} |