blob: df639ca2cd84f836f756c462f5a6b0ae8477d606 [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
Denis Vlasenko8dbea7d2008-07-26 14:20:04 +00009echo "child sleeps"
Denis Vlasenko4e19a9c2008-07-26 13:45:57 +000010sleep 1
11echo "BAD exit from child!"
12' &
13
14child=$!
15sleep 0.1 # let child install handler first
16kill -HUP $child
17wait
18echo "parent exits"