signal一般用来实现优雅重启,或者重新加载配置文件等操作。

废话不多说,上表格

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。
动作 号码 信号 golang
kill pid 15 SIGTERM terminated
kill -9 pid 9 SIGKILL killed (应用程序无法捕获)
kill -10 pid 10 SIGUSR1 user defined signal 1
kill -12 pid 12 SIGUSR2 user defined signal 2
ctrl+c 2 SIGINT interrupt
ctrl+z 20 SIGTSTP stopped
ctrl+\ 3 SIGQUIT quit
kill -1 pid 1 SIGHUP operation not permitted (一般用来重新加载配置文件)

参考:

http://www.cnblogs.com/jkkkk/p/6180016.html 
http://blog.csdn.net/zzhongcy/article/details/50601079 
http://os.51cto.com/art/201006/203953.htm

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄