linux kill() return 在进程执行信号处理程序之后?

does linux kill() return after the process excute signal handler?

我想使用 kill() 来终止程序。 linux 内核是否确保程序在 kill() 返回之前被终止? 如果没有,我得检查程序是否已经被杀死。

does linux kernel ensure that the program is killed before kill() returned?

不,kill 只是 sends a signal to a process or group of processes。它的成功return只是告诉你信号已发送。

Linux 手册页对此直截了当,阐明了成功的 return 意味着 "at least one signal was sent"

因此,这不会告诉您信号是否 blocked/held 被目标进程挂起、被忽略 (SIG_IGN)、已采取默认操作、已被处理或被接受。