aboutsummaryrefslogtreecommitdiff
path: root/shell/hush_test/hush-signals/signal9.tests
diff options
context:
space:
mode:
Diffstat (limited to 'shell/hush_test/hush-signals/signal9.tests')
-rwxr-xr-xshell/hush_test/hush-signals/signal9.tests21
1 files changed, 21 insertions, 0 deletions
diff --git a/shell/hush_test/hush-signals/signal9.tests b/shell/hush_test/hush-signals/signal9.tests
new file mode 100755
index 000000000..18e71012b
--- /dev/null
+++ b/shell/hush_test/hush-signals/signal9.tests
@@ -0,0 +1,21 @@
1# Note: the inner script is a test which checks for a different bug
2# (ordering between INT handler and exit on "set -e"),
3# but so far I did not figure out how to simulate it non-interactively.
4
5"$THIS_SH" -c '
6exit_func() {
7 echo "Removing traps"
8 trap - EXIT TERM INT
9 echo "End of exit_func"
10}
11set -e
12trap exit_func EXIT TERM INT
13sleep 2
14exit 77
15' &
16
17child=$!
18sleep 1
19kill -TERM $child
20wait
21echo Done: $?