manners
manners copied to clipboard
Signal example should use syscall.SIGTERM instead of os.Kill
Regarding the documented signals example, os.Kill can't be caught, it's just there for killing other processes.
os.Kill is like kill -9
which kills a process immediately
syscall.SIGTERM is equivalent to kill
which allows the process time to cleanup
signal.Notify(sigchan, os.Interrupt, syscall.SIGTERM)
ref: #9