Propagate TERM signal to services
This commit is contained in:
parent
61e410ed9d
commit
a8944ecb1a
@ -290,6 +290,15 @@ func Supervise(commands []*exec.Cmd) error {
|
||||
}
|
||||
}()
|
||||
|
||||
go func() {
|
||||
c := make(chan os.Signal, 1)
|
||||
signal.Notify(c, unix.SIGTERM)
|
||||
|
||||
for range c {
|
||||
killSupervisedServices()
|
||||
}
|
||||
}()
|
||||
|
||||
go func() {
|
||||
buf := make([]byte, 1)
|
||||
for {
|
||||
|
Loading…
x
Reference in New Issue
Block a user