source: trunk/essentials/app-shells/bash/tests/jobs1.sub

Last change on this file was 3228, checked in by bird, 18 years ago

bash 3.1

File size: 241 bytes
Line 
1# make sure that jobs -p, %+, and $! all agree
2set -m
3sleep 60 &
4
5FN=/tmp/jobs-pid.$$
6
7pid1=$!
8jobs -p %+ > $FN
9pid2=$(< $FN)
10rm $FN
11
12if [ $pid1 -ne $pid2 ]; then
13 echo 'oops - $! and jobs -p %+ disagree!'
14fi
15
16exec 2>/dev/null
17kill -9 $pid1
Note: See TracBrowser for help on using the repository browser.