mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-14 02:57:52 +08:00
17 lines
252 B
Go
17 lines
252 B
Go
package shell
|
|
|
|
import (
|
|
"io"
|
|
"os"
|
|
"syscall"
|
|
)
|
|
|
|
func handleSignal(sig os.Signal, stderr io.Writer) {
|
|
switch sig {
|
|
// See https://pkg.go.dev/os/signal#hdr-Windows for the semantics of SIGTERM
|
|
// on Windows.
|
|
case syscall.SIGTERM:
|
|
os.Exit(0)
|
|
}
|
|
}
|