Files

17 lines
258 B
Plaintext

# tests for traps on SIGCHLD and async commands
set -m
trap 'echo CHLD' SIGCHLD
{ echo before ; : ; echo after; } &
wait
# use sleep 2 to avoid reaping these children while running the SIGCHLD trap
# after the `sleep 1'
sleep 2 &
sleep 2 &
sleep 1
wait