diff options
Diffstat (limited to 'shell/hush_test/hush-signals/signal8.tests')
-rwxr-xr-x | shell/hush_test/hush-signals/signal8.tests | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/shell/hush_test/hush-signals/signal8.tests b/shell/hush_test/hush-signals/signal8.tests new file mode 100755 index 0000000..731af74 --- /dev/null +++ b/shell/hush_test/hush-signals/signal8.tests @@ -0,0 +1,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: $? |