The Go runtime scheduling uses signal 23 (SIGURG) since Go 1.14 (see 24543-non-cooperative-preemption.md). Because the Go runtime does not know if the process expects external SIGURG signals, the signal is not filtered out from signal.Notify, but always reported to the process (see golang/go#37942 for discussion). Preflight should filter this signal out itself before forwarding and when the child process isn't up yet it should also not exit when it is received.
|
signal.Notify(stop) |
|
for sig := range stop { |
|
if proc != nil { |
|
proc.Signal(sig) |
|
} else { |
|
// Signal received before the process even started. Let's just exit. |
|
os.Exit(1) |
|
} |