SIGCHLD sent to SIGTERM?

The Wikipedia page for SIGCHLD reads:

The SIGCHLD signal is sent to the parent process of the child process when its outputs are interrupted or resume after the interrupt.

Does this mean that when the parent process sends some signal (for example, SIGTERM ) to the child process, it, in turn, will receive SIGCHLD from the child?

Or am I misinterpreting the interrupt (I assume it means any received signal), in which case, which signals are touching?

+4
source share
1 answer

SIGCHLD is delivered to parents in the following cases:

  • The child process is running.
  • The child process is stopped by the signals SIGSTOP, SIGTSTP, SIGTTIN or SIGTTOU
  • Baby process resumes with SIGCONT signal

I would suggest that SIGSTOP / SIGCONT is what wikipedia means β€œinterrupted”.

The default handler for SIGTERM is the end of the process. Therefore, if a parent sends SIGTERM to a child process that terminates this child, then yes - the parent will receive SIGCHLD.

If the child establishes a signal handler that does not complete it, the parent line signal will not be passed to the parent element.

+5
source

Source: https://habr.com/ru/post/1498934/


All Articles