From owner-svn-src-user@FreeBSD.ORG Wed Dec 25 13:51:14 2013 Return-Path: Delivered-To: svn-src-user@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id B7C8B917; Wed, 25 Dec 2013 13:51:14 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id A46B017BD; Wed, 25 Dec 2013 13:51:14 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id rBPDpEfB045978; Wed, 25 Dec 2013 13:51:14 GMT (envelope-from pho@svn.freebsd.org) Received: (from pho@localhost) by svn.freebsd.org (8.14.7/8.14.7/Submit) id rBPDpEI2045977; Wed, 25 Dec 2013 13:51:14 GMT (envelope-from pho@svn.freebsd.org) Message-Id: <201312251351.rBPDpEI2045977@svn.freebsd.org> From: Peter Holm Date: Wed, 25 Dec 2013 13:51:14 +0000 (UTC) To: src-committers@freebsd.org, svn-src-user@freebsd.org Subject: svn commit: r259867 - user/pho/stress2/misc X-SVN-Group: user MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-user@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: "SVN commit messages for the experimental " user" src tree" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Dec 2013 13:51:14 -0000 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