diff options
Diffstat (limited to 'libgo/go/runtime/os_darwin.go')
-rw-r--r-- | libgo/go/runtime/os_darwin.go | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/libgo/go/runtime/os_darwin.go b/libgo/go/runtime/os_darwin.go index 58e0412600c..0ae716c42d7 100644 --- a/libgo/go/runtime/os_darwin.go +++ b/libgo/go/runtime/os_darwin.go @@ -4,7 +4,9 @@ package runtime -import "unsafe" +import ( + "unsafe" +) type mOS struct { initialized bool @@ -115,10 +117,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. |