hush/shell/ash_test/ash-signals/signal2.tests
Denis Vlasenko 4e19a9c81a ash: hopefully close bug 4324. With testcase.
function                                             old     new   delta
evaltree                                             621     869    +248
popstring                                            134     140      +6
2008-07-26 13:45:57 +00:00

19 lines
252 B
Bash
Executable File

#!/bin/sh
$THIS_SH -c '
cleanup() {
echo "child exits as expected"
exit
}
trap cleanup HUP
echo "sleeping"
sleep 1
echo "BAD exit from child!"
' &
child=$!
sleep 0.1 # let child install handler first
kill -HUP $child
wait
echo "parent exits"