From c1a068012c67dfc794c0ecfd7d77db451d2cadac Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Tue, 1 May 2018 01:59:09 +0200 Subject: [PATCH] runtime: remove darwin workaround for process-wide raise Now that raise on darwin targets the current thread, we can remove the workaround in dieFromSignal. Change-Id: I1e468dc05e49403ee0bbe0a3a85e764c81fec4f2 Reviewed-on: https://go-review.googlesource.com/110476 Run-TryBot: Elias Naur TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick Reviewed-by: Keith Randall --- src/runtime/signal_unix.go | 8 -------- 1 file changed, 8 deletions(-) diff --git a/src/runtime/signal_unix.go b/src/runtime/signal_unix.go index 8bc73b7a23..6cd9f8ddb6 100644 --- a/src/runtime/signal_unix.go +++ b/src/runtime/signal_unix.go @@ -440,14 +440,6 @@ func dieFromSignal(sig uint32) { osyield() osyield() - // On Darwin we may still fail to die, because raise sends the - // signal to the whole process rather than just the current thread, - // and osyield just sleeps briefly rather than letting all other - // threads run. See issue 20315. Sleep longer. - if GOOS == "darwin" { - usleep(100) - } - // If we are still somehow running, just exit with the wrong status. exit(2) } -- 2.51.0