summaryrefslogtreecommitdiffhomepage
path: root/shell/hush_test/hush-signals/signal8.tests
blob: 731af7477ca98e0b7e287ec18fe74c4266de8e34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
"$THIS_SH" -c '
exit_func() {
    echo "Removing traps"
    trap - EXIT TERM INT
    echo "End of exit_func"
}
set -e
trap exit_func EXIT TERM INT
sleep 2
exit 77
' &

sleep 1
# BUG: ash kills -PGRP, but in non-interactive shell we do not create pgrps!
# In this case, bash kills by PID, not PGRP.
kill -TERM %1
wait
echo Done: $?