Go信号监听
https://cloud.tencent.com/developer/article/1645996
https://colobu.com/2015/10/09/Linux-Signals/
https://superuser.com/questions/1075379/send-sigterm-with-command-line-shortcut
http://books.studygolang.com/The-Golang-Standard-Library-by-Example/chapter16/16.03.html
Ctrl-C 发送 INT signal (SIGINT),通常导致进程结束
Ctrl-Z 发送 TSTP signal (SIGTSTP); 通常导致进程挂起(suspend)
Ctrl-\ 发送 QUIT signal (SIGQUIT); 通常导致进程结束 和 dump core.
Ctrl-T (不是所有的UNIX都支持) 发送INFO signal (SIGINFO); 导致操作系统显示此运行命令的信息
原文作者: fliter
原文链接:
http://www.dashen.tech/2022/06/02/Go信号监听/版权声明: 转载请注明出处