zorg/zorg.go

19 lines
278 B
Go
Raw Permalink Normal View History

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