zorg/zorg.go

19 lines
278 B
Go
Raw Normal View History

2020-10-08 15:33:26 -04:00
package main
import (
"os"
"os/signal"
2023-07-14 18:25:03 -04:00
"syscall"
2020-10-08 15:33:26 -04: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 18:25:03 -04:00
signal.Notify(c, os.Interrupt, syscall.SIGTERM)
2020-10-08 15:33:26 -04:00
<-c
os.Exit(0)
}