aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/os_darwin.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/runtime/os_darwin.go')
-rw-r--r--src/runtime/os_darwin.go13
1 files changed, 9 insertions, 4 deletions
diff --git a/src/runtime/os_darwin.go b/src/runtime/os_darwin.go
index df2c0ff4a5..ca61f20e8a 100644
--- a/src/runtime/os_darwin.go
+++ b/src/runtime/os_darwin.go
@@ -118,10 +118,15 @@ func sigNoteWakeup(*note) {
// sigNoteSleep waits for a note created by sigNoteSetup to be woken.
func sigNoteSleep(*note) {
- entersyscallblock()
- var b byte
- read(sigNoteRead, unsafe.Pointer(&b), 1)
- exitsyscall()
+ for {
+ var b byte
+ entersyscallblock()
+ n := read(sigNoteRead, unsafe.Pointer(&b), 1)
+ exitsyscall()
+ if n != -_EINTR {
+ return
+ }
+ }
}
// BSD interface for threading.