1 2 3 4 5 6 7 8 9 10 11 12 13 14
#! /bin/sh # # show that setting a trap on SIGCHLD is not disastrous. # trap 'echo caught a child death' SIGCHLD sleep 5 & sleep 5 & sleep 5 & wait exit 0