2004-07-27 13:29:18 +00:00
|
|
|
# test being able to use job control notation in jobs/kill/wait without
|
|
|
|
# job control active, as the SUS requires
|
|
|
|
|
|
|
|
sleep 5 &
|
|
|
|
|
|
|
|
sleep 5 &
|
|
|
|
sleep 5 &
|
|
|
|
sleep 5 &
|
|
|
|
(sleep 5 ; exit 4) &
|
|
|
|
|
|
|
|
jobs
|
|
|
|
|
|
|
|
wait %%
|
|
|
|
echo $?
|
|
|
|
|
|
|
|
wait %1
|
|
|
|
echo $?
|
|
|
|
|
|
|
|
wait
|
|
|
|
|
2005-12-07 14:08:12 +00:00
|
|
|
# the sleep is intended to give the kill time to execute before the job
|
|
|
|
# exits
|
|
|
|
(sleep 1 ; cat ) &
|
2004-07-27 13:29:18 +00:00
|
|
|
kill -1 %% && echo i killed it || echo could not kill it
|