diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest index b2ee3ec24..79097b86b 100755 --- a/libgo/testsuite/gotest +++ b/libgo/testsuite/gotest @@ -504,6 +504,7 @@ xno) fi ${GL} *.o ${GOLIBS} + set +e if test "$bench" = ""; then if test "$trace" = "true"; then echo ./a.out -test.short -test.timeout=${timeout}s "$@" @@ -518,9 +519,11 @@ xno) wait $pid status=$? if ! test -f gotest-timeout; then - out=`ps -o pid,ppid | grep " $alarmpid" | cut -f1 -d" "` - if test "x$out" != "x"; then - kill -9 $out + sleeppid=`ps -o pid,ppid,cmd | grep " $alarmpid " | grep sleep | sed -e 's/ *\([0-9]*\) .*$/\1/'` + kill $alarmpid + wait $alarmpid + if test "$sleeppid" != ""; then + kill $sleeppid fi fi else