OILS
/
spec
/
testdata
/ builtin-trap-exit.sh
View on Github
|
oilshell.org
12 lines, 5 significant
1
2
# Why don't other shells run this trap? It's not a subshell
3
$SH -c
'
trap "echo on exit" EXIT; sleep 0.1
'
&
4
5
sleep 0.05
6
7
# Note: this is SIGINT, for the KeyboardInterrupt problem
8
$(command -v kill) -INT $!
9
10
wait
11
12
echo status=$?