aboutsummaryrefslogtreecommitdiff
path: root/libgo
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2015-08-07 10:10:00 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2015-08-07 10:10:00 +0000
commitd0ceffe507fe615536259a326fcb7e6eb9a42765 (patch)
tree0cf14d708c9182436efecdff9ddb8ffae45a6212 /libgo
parent82b110199afddd36478f3c5e31fea87778ab5400 (diff)
downloadgcc-d0ceffe507fe615536259a326fcb7e6eb9a42765.zip
gcc-d0ceffe507fe615536259a326fcb7e6eb9a42765.tar.gz
gcc-d0ceffe507fe615536259a326fcb7e6eb9a42765.tar.bz2
libgo/testsuite: don't call kill without args
If the timeout subshell has no child processes, the "xargs | kill" will fail. Ensure there is some input for kill before calling it. Reviewed-on: https://go-review.googlesource.com/13295 From-SVN: r226719
Diffstat (limited to 'libgo')
-rwxr-xr-xlibgo/testsuite/gotest5
1 files changed, 4 insertions, 1 deletions
diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest
index 7d5e99f..b2ee3ec 100755
--- a/libgo/testsuite/gotest
+++ b/libgo/testsuite/gotest
@@ -518,7 +518,10 @@ xno)
wait $pid
status=$?
if ! test -f gotest-timeout; then
- ps -o pid,ppid | grep " $alarmpid" | cut -f1 -d" " | xargs kill -9
+ out=`ps -o pid,ppid | grep " $alarmpid" | cut -f1 -d" "`
+ if test "x$out" != "x"; then
+ kill -9 $out
+ fi
fi
else
if test "$trace" = "true"; then