$RodHat_/search
signal reference

SIGCHLD

A child process stopped, continued or terminated.

Linux number
17
FreeBSD number
20
Default action
Ignored
Catch, block or ignore
Allowed
Standard
POSIX.1-1990

Ignored by default, but the child stays a zombie until the parent calls wait(2). Setting the disposition explicitly to SIG_IGN (or SA_NOCLDWAIT) tells the kernel to reap children for you. Signals do not queue, so one SIGCHLD can stand for several dead children: loop on waitpid(-1, WNOHANG) until it returns 0.

Related syscalls

  • pidfd_open(2)Linux · Processes

    Get a file descriptor that refers to a process, immune to PID reuse.

  • clone3(2)Linux · Processes

    Fork a child process using a struct-based API; write a pidfd atomically with CLONE_PIDFD.

Sources

  1. signal(7), Linux man-pages
  2. signal(3), FreeBSD manual

Numbers are Linux on x86 and arm64; alpha, mips, sparc and parisc number some signals differently. Spot one that's wrong? Tell Rod.