mirror of
https://github.com/openziti/zrok.git
synced 2024-11-21 23:53:19 +01:00
added _linux signals
This commit is contained in:
parent
1c245e2f31
commit
3b06dd6cf3
14
cmd/zrok/signals_linux.go
Normal file
14
cmd/zrok/signals_linux.go
Normal file
@ -0,0 +1,14 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/signal"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func newSignalHandler() chan os.Signal {
|
||||
signalHandler := make(chan os.Signal, 1)
|
||||
signal.Notify(signalHandler, unix.SIGINT, unix.SIGTERM, unix.SIGHUP, unix.SIGQUIT)
|
||||
return signalHandler
|
||||
}
|
@ -1,6 +1,9 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/signal"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user