blob: b56c2d97eef33cb80c59eee77bfd6ad185daf058 [file] [log] [blame]
Denis Vlasenko8dbea7d2008-07-26 14:20:04 +00001#!/bin/sh
2
3$THIS_SH -c '
4hup() {
5 echo "child got HUP"
6}
7trap hup HUP
8echo "child sleeps"
9sleep 1
10echo "child exits"
11' &
12
13child=$!
14sleep 0.1 # let child install handler first
15kill -HUP $child
16wait
17echo "parent exits"