Ignore external SIGURG
Go 1.14+ sends SIGURG to Ms to attempt asynchronous preemption of a G. Since it can't guarantee that a SIGURG is only related to preemption, it continues to forward them to signal.Notify (see runtime.sighandler). We should ignore these signals, as applications shouldn't receive them. Note that this means that truly external SIGURG can no longer be sent to the application (as with SIGCHLD). PiperOrigin-RevId: 291415357
This commit is contained in:
parent
24cfbf4b98
commit
390bb9c241
|
@ -38,6 +38,9 @@ const SignalPanic = linux.SIGUSR2
|
||||||
// Preconditions: Kernel must have an init process.
|
// Preconditions: Kernel must have an init process.
|
||||||
func (k *Kernel) sendExternalSignal(info *arch.SignalInfo, context string) {
|
func (k *Kernel) sendExternalSignal(info *arch.SignalInfo, context string) {
|
||||||
switch linux.Signal(info.Signo) {
|
switch linux.Signal(info.Signo) {
|
||||||
|
case linux.SIGURG:
|
||||||
|
// Sent by the Go 1.14+ runtime for asynchronous goroutine preemption.
|
||||||
|
|
||||||
case platform.SignalInterrupt:
|
case platform.SignalInterrupt:
|
||||||
// Assume that a call to platform.Context.Interrupt() misfired.
|
// Assume that a call to platform.Context.Interrupt() misfired.
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue