SIGCHLD Signal Explained (Signal 17)

What the Linux SIGCHLD signal does and when it's used.

Published October 24, 2026

SIGCHLD (signal 17) is sent to a parent process when a child process exits, stops or continues. Parents handle it to reap children and avoid zombies.

What it does

Default action: Ignore. It can be caught with a signal handler.

Typically sent by: the kernel when a child changes state. List all signals with kill -l.

Signal number and delivery

kill -l | grep SIGCHLD
17) SIGCHLD
kill -17 1234 # or kill -CHLD 1234
(signal delivered to process 1234)

Practical examples

Send it from the shell

kill -17 <PID>
kill -SIGCHLD <PID>
pkill -17 nginx

Handle it in a script

trap 'echo got SIGCHLD; cleanup; exit' SIGCHLD
while true; do sleep 1; done

Handle it in code

import signal, sys
def handler(sig, frame):
    print('received', sig)
    sys.exit(0)
signal.signal(signal.SIGCHLD, handler)

Common mistakes

  • Using kill -9 before trying SIGTERM.
  • Forgetting to find the right PID (ps aux | grep, pgrep).
  • Not handling signals in long-running services.

Key takeaways

  • SIGCHLD is signal 17.
  • Default: Ignore.
  • Use kill -l to list all signals.

FAQ

What is a zombie process?

A child that exited but whose parent has not yet called wait() to collect its status.

How do I list all signals?

Run kill -l.

More Linux articles