mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-13 18:07:51 +08:00
7a72b6346a
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".
17 lines
300 B
Go
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
|
|
}
|