Is there some guideline on how much time a linux process should maximally take to exit after receiving a SIGTERM signal?
EDIT: I'm asking because I have to decide on timeouts for blocking I/O calls.
Is there some guideline on how much time a linux process should maximally take to exit after receiving a SIGTERM signal?
EDIT: I'm asking because I have to decide on timeouts for blocking I/O calls.
There is no maximum. A process can simply ignore SIGTERM
. It can be stopped, in which case it won't handle the SIGTERM
until it gets a SIGCONT
. It can be blocked in an uninterruptible system call. (I don't have a current example, but I certainly remember uninterruptible reads/writes when a hard mounted NFS server had failed. And if you happen to be writing your own kernel modules, well...) Finally, if the system is under heavy load, it can take much longer for the process to respond to the signal.