Is the kill function in Linux synchronous? Say, I programatically call the kill function to terminate a process, will it return only when the intended process is terminated, or it just sends the signal and return. If that is the case, how can I make it wait for the intended process to be killed?
Is the kill function in Linux synchronous? Say, I programatically call the kill function
Share
No, since it doesn’t kill anything, it only sends a signal to the process.
By default this signal can even be blocked or ignored.
You can’t block
kill -9which represents sendingSIGKILLTo wait for the process to die: