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
5sleep 0.05
6
7# Note: this is SIGINT, for the KeyboardInterrupt problem
8$(command -v kill) -INT $!
9
10wait
11
12echo status=$?