svn commit: r259867 - user/pho/stress2/misc
Peter Holm
pho at FreeBSD.org
Wed Dec 25 13:51:14 UTC 2013
Author: pho
Date: Wed Dec 25 13:51:14 2013
New Revision: 259867
URL: http://svnweb.freebsd.org/changeset/base/259867
Log:
Handle leading space in pid and add more cleanup.
Sponsored by: EMC / Isilon storage division
Modified:
user/pho/stress2/misc/signal.sh
Modified: user/pho/stress2/misc/signal.sh
==============================================================================
--- user/pho/stress2/misc/signal.sh Wed Dec 25 12:41:53 2013 (r259866)
+++ user/pho/stress2/misc/signal.sh Wed Dec 25 13:51:14 2013 (r259867)
@@ -192,7 +192,7 @@ cc -o waitthread -Wall -Wextra waitthrea
cc -o tkill -Wall -Wextra tkill.c || exit
rm -f waitthread.c tkill.c
-rm -f gdbfifo gdbout pstat
+rm -f gdbfifo gdbout pstat /tmp/waitthread
mkfifo gdbfifo
sleep 300 > gdbfifo & # Keep the fifo open
fifopid=$!
@@ -202,7 +202,7 @@ echo "set args 8" > gdbfifo
echo "run" > gdbfifo
sleep .2
-pid=`ps | grep -v grep | grep "waitthread 8" | sed 's/ .*//'`
+pid=`ps | grep -v grep | grep "waitthread 8" | sed 's/^ *//;s/ .*//'`
procstat -t $pid > pstat
t1=`grep fifo pstat | awk '{print $2}'`
@@ -217,7 +217,7 @@ echo "quit" > gdbfifo
kill $fifopid
if grep -q "signal SIGINT" gdbout; then
- rm -f gdbfifo gdbout pstat waitthread tkill
+ rm -f gdbfifo gdbout pstat waitthread tkill /tmp/waitthread
else
echo FAIL
fi
More information about the svn-src-user
mailing list