1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-13 10:02:38 +00:00

'-F' option now needs locked pidfile. Modify regression tests respectively.

This commit is contained in:
Pawel Jakub Dawidek 2005-08-24 19:39:29 +00:00
parent 712bf6af16
commit dfe47d36df
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=149436
2 changed files with 4 additions and 6 deletions

View File

@ -9,16 +9,15 @@ name="pgrep -F <pidfile>"
pidfile=`mktemp /tmp/$base.XXXXXX` || exit 1
sleep=`mktemp /tmp/$base.XXXXXX` || exit 1
ln -sf /bin/sleep $sleep
$sleep 5 &
daemon -p $pidfile $sleep 5
sleep 0.3
chpid=$!
echo $chpid > $pidfile
chpid=`cat $pidfile`
pid=`pgrep -f -F $pidfile $sleep`
if [ "$pid" = "$chpid" ]; then
echo "ok - $name"
else
echo "not ok - $name"
fi
kill $chpid
kill "$chpid"
rm -f $pidfile
rm -f $sleep

View File

@ -9,9 +9,8 @@ name="pkill -F <pidfile>"
pidfile=`mktemp /tmp/$base.XXXXXX` || exit 1
sleep=`mktemp /tmp/$base.XXXXXX` || exit 1
ln -sf /bin/sleep $sleep
$sleep 5 &
daemon -p $pidfile $sleep 5
sleep 0.3
echo $! > $pidfile
pkill -f -F $pidfile $sleep
ec=$?
case $ec in