blob: b56c2d97eef33cb80c59eee77bfd6ad185daf058 [file] [log] [blame]
Denys Vlasenko5d6b8722016-10-02 17:39:31 +02001#!/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"