testscript/testdata/kill.txt
raw| 1 | [!exec:sleep] skip |
| 2 | |
| 3 | # This test depends on sleep exiting with a non-success status when being |
| 4 | # terminated by an interrupt (kill on Windows) signal. |
| 5 | |
| 6 | ! exec sleep 10 &test_sleep& |
| 7 | |
| 8 | # Set a timeout. If the kill below fails, this sleep will have terminated |
| 9 | # before the test exits and so the test will fail when it completes. |
| 10 | ! exec sleep 5 & |
| 11 | |
| 12 | kill -KILL test_sleep |
| 13 | wait test_sleep |