blob: df639ca2cd84f836f756c462f5a6b0ae8477d606 [file] [log] [blame]
Denys Vlasenko5d6b8722016-10-02 17:39:31 +02001#!/bin/sh
2
3$THIS_SH -c '
4cleanup() {
5 echo "child exits as expected"
6 exit
7}
8trap cleanup HUP
9echo "child sleeps"
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"