]>
Commit | Line | Data |
---|---|---|
b80f6443 JA |
1 | # test being able to use job control notation in jobs/kill/wait without |
2 | # job control active, as the SUS requires | |
3 | ||
4 | sleep 5 & | |
5 | ||
6 | sleep 5 & | |
7 | sleep 5 & | |
8 | sleep 5 & | |
9 | (sleep 5 ; exit 4) & | |
10 | ||
11 | jobs | |
12 | ||
13 | wait %% | |
14 | echo $? | |
15 | ||
16 | wait %1 | |
17 | echo $? | |
18 | ||
19 | wait | |
20 | ||
95732b49 JA |
21 | # the sleep is intended to give the kill time to execute before the job |
22 | # exits | |
23 | (sleep 1 ; cat ) & | |
b80f6443 | 24 | kill -1 %% && echo i killed it || echo could not kill it |