]> Cypherpunks repositories - gostls13.git/commitdiff
runtime: remove darwin workaround for process-wide raise
authorElias Naur <elias.naur@gmail.com>
Mon, 30 Apr 2018 23:59:09 +0000 (01:59 +0200)
committerElias Naur <elias.naur@gmail.com>
Mon, 21 May 2018 20:58:28 +0000 (20:58 +0000)
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 <elias.naur@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Keith Randall <khr@golang.org>
src/runtime/signal_unix.go

index 8bc73b7a23453939ed4b452ea94ffe7d46899580..6cd9f8ddb6f5892cd21a1c9ec0852dfb0a5fb2f6 100644 (file)
@@ -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)
 }