source:
trunk/essentials/app-shells/bash/tests/jobs1.sub
Last change on this file was 3228, checked in by , 18 years ago | |
---|---|
File size: 241 bytes |
Line | |
---|---|
1 | # make sure that jobs -p, %+, and $! all agree |
2 | set -m |
3 | sleep 60 & |
4 | |
5 | FN=/tmp/jobs-pid.$$ |
6 | |
7 | pid1=$! |
8 | jobs -p %+ > $FN |
9 | pid2=$(< $FN) |
10 | rm $FN |
11 | |
12 | if [ $pid1 -ne $pid2 ]; then |
13 | echo 'oops - $! and jobs -p %+ disagree!' |
14 | fi |
15 | |
16 | exec 2>/dev/null |
17 | kill -9 $pid1 |
Note:
See TracBrowser
for help on using the repository browser.