elvish/pkg/sys/signal_nonunix.go
Qi Xiao 7a72b6346a Reorganize pkg/sys into portable and non-portable system utilities.
Non-portable ones are moved into new packages pkg/sys/e{unix windows}. The "e"
prefix is needed to avoid conflict with packages under golang.org/x/sys/ and can
mean "extra".
2021-10-02 13:14:00 +01:00

17 lines
300 B
Go

//go:build windows || plan9 || js
// +build windows plan9 js
package sys
import (
"os"
"os/signal"
)
func notifySignals() chan os.Signal {
// This catches every signal regardless of whether it is ignored.
sigCh := make(chan os.Signal, sigsChanBufferSize)
signal.Notify(sigCh)
return sigCh
}