1 | |
2 | # ISSUE WITH TEST: & means that trap handler isn't run! |
3 | # I guess because the background job gets disconnected from the terminal? |
4 | # So it doesn't need SIGINT |
5 | |
6 | # We need some other way to kill it with SIGINT |
7 | |
8 | $SH -c 'trap "echo int" INT; sleep 0.1' & |
9 | |
10 | sleep 0.05 |
11 | |
12 | $(command -v kill) -INT $! |
13 | |
14 | wait |
15 | |
16 | echo status=$? |