blob: 04f981c2d01b0582f330e9c0e8256434913af5d3 [file] [log] [blame]
Denis Vlasenko4e19a9c2008-07-26 13:45:57 +00001#!/bin/sh
2
3$THIS_SH -c '
4cleanup() {
5 echo "child exits as expected"
6 exit
7}
8trap cleanup HUP
9echo "sleeping"
10sleep 1
11echo "BAD exit from child!"
12' &
13
14child=$!
15sleep 0.1 # let child install handler first
16kill -HUP $child
17wait
18echo "parent exits"