mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-14 02:57:52 +08:00
f7cb556d9b
- Run "go fix" to remove legacy build tags - Use staticcheck@master until it has a release that supports Go 1.18 - Turn off autocrlf for Windows tasks
16 lines
273 B
Go
16 lines
273 B
Go
//go: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
|
|
}
|