zorg/zorg.go

19 lines
278 B
Go
Raw Normal View History

2020-10-08 14:33:26 -05:00
package main
import (
"os"
"os/signal"
2023-07-14 17:25:03 -05:00
"syscall"
2020-10-08 14:33:26 -05:00
)
func main() {
// Just a nice way to wait until the Operating system sends a kill signal.
// select{} was just horrible.
c := make(chan os.Signal, 1)
2023-07-14 17:25:03 -05:00
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
2020-10-08 14:33:26 -05:00
<-c
os.Exit(0)
}