sigint sigterm sigkill
sigint sigterm都将收到信号。区别在于sigint会对进程树发送信号,因此子进程也会自动退出。(on Unix in most cases the parent and child will share a controlling terminal. Pressing Ctrl+C in the terminal will broadcast SIGINT to all processes, parent and child. )
sigkill不能被程序捕获,因此一旦收到信号,进程退出。子进程无法退出,成为孤儿。