]> git.ipfire.org Git - thirdparty/bash.git/blame - tests/jobs1.sub
Bash-4.3 patch 7
[thirdparty/bash.git] / tests / jobs1.sub
CommitLineData
cce855bc
JA
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