mirror of
https://github.com/Neur0toxine/whprintf.git
synced 2024-12-04 19:06:05 +03:00
20 lines
262 B
Go
20 lines
262 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"log"
|
||
|
"os"
|
||
|
"os/signal"
|
||
|
"syscall"
|
||
|
)
|
||
|
|
||
|
func processSignals() {
|
||
|
c := make(chan os.Signal, 1)
|
||
|
signal.Notify(c, syscall.SIGHUP, syscall.SIGINT, syscall.SIGTERM, syscall.SIGQUIT)
|
||
|
|
||
|
for {
|
||
|
<-c
|
||
|
log.Println("Quitting...")
|
||
|
os.Exit(0)
|
||
|
}
|
||
|
}
|