Suppose you programmed your signal handler to stop a process using signals like:
- SIGTERM: to terminate a process; it can be blocked, handled, and ignored unlike SIGKILL.
- SIGKILL: to immediately terminate a process
- SIGSTOP: to pause the process in its current state
restart_syscalls
specifies whether system call restarting should be used when signo
arrives. Examples of signo
are the three I listed above and there are much more.
This means, if restart_syscalls
is set to the default value TRUE, this will restart certain system calls after a process that was stopped by a signal signo
. It restarts the interrupted system call with a time argument that is suitably adjusted to account for the time that has already elapsed.
I forward you to this very simple and clear example: pcntl_wait not interrupted by SIGTERM