manners icon indicating copy to clipboard operation
manners copied to clipboard

Signal example should use syscall.SIGTERM instead of os.Kill

Open nathany opened this issue 8 years ago • 0 comments

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

nathany avatar Jan 26 '17 23:01 nathany