1
0
mirror of https://github.com/golang/go synced 2024-11-23 06:50:05 -07:00

os/signal: remove comments about SA_RESTART

It's no longer necessary for non-Go signal handlers to use SA_RESTART.

For #20400
Fixes #44761

Change-Id: Ie3c7fecc631a4a2822331754296ea09b308e1391
Reviewed-on: https://go-review.googlesource.com/c/go/+/298269
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
Reviewed-by: Bryan C. Mills <bcmills@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
This commit is contained in:
Ian Lance Taylor 2021-03-03 08:04:40 -08:00
parent bd37284784
commit a08adda12c

View File

@ -129,9 +129,7 @@ If the non-Go code installs any signal handlers, it must use the
SA_ONSTACK flag with sigaction. Failing to do so is likely to cause SA_ONSTACK flag with sigaction. Failing to do so is likely to cause
the program to crash if the signal is received. Go programs routinely the program to crash if the signal is received. Go programs routinely
run with a limited stack, and therefore set up an alternate signal run with a limited stack, and therefore set up an alternate signal
stack. Also, the Go standard library expects that any signal handlers stack.
will use the SA_RESTART flag. Failing to do so may cause some library
calls to return "interrupted system call" errors.
If the non-Go code installs a signal handler for any of the If the non-Go code installs a signal handler for any of the
synchronous signals (SIGBUS, SIGFPE, SIGSEGV), then it should record synchronous signals (SIGBUS, SIGFPE, SIGSEGV), then it should record