source:
trunk/essentials/app-shells/bash/tests/jobs4.sub
Last change on this file was 3228, checked in by , 18 years ago | |
---|---|
File size: 380 bytes |
Line | |
---|---|
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 | |
21 | # the sleep is intended to give the kill time to execute before the job |
22 | # exits |
23 | (sleep 1 ; cat ) & |
24 | kill -1 %% && echo i killed it || echo could not kill it |
Note:
See TracBrowser
for help on using the repository browser.