diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-01-11 17:55:39 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2016-01-11 17:55:39 +0000 |
commit | de41ebf5ddab45c643cfe8166c1d274ed4620d4f (patch) | |
tree | 3f1683873db94b9851ca86cfa67509b430f11c49 /libgo/testsuite | |
parent | 7c285ab9ae4726b4821379c82d16d2373cd46f8f (diff) | |
download | gcc-de41ebf5ddab45c643cfe8166c1d274ed4620d4f.zip gcc-de41ebf5ddab45c643cfe8166c1d274ed4620d4f.tar.gz gcc-de41ebf5ddab45c643cfe8166c1d274ed4620d4f.tar.bz2 |
re PR go/68980 (ps -o cmd in gotest isn't portable)
PR 68980
libgo/testsuite: portable ps usage in gotest
gotest is using "ps" to list descendant sleep
processes in its timeout handling, grepping
the command name.
We are currently using the "cmd" ps output
formatter, which is non-portable. We should
use "comm" which is part of the POSIX
standard, and outputs only the command name
and not the arguments.
Fixes https://gcc.gnu.org/PR68980
Reviewed-on: https://go-review.googlesource.com/18426
From-SVN: r232234
Diffstat (limited to 'libgo/testsuite')
-rwxr-xr-x | libgo/testsuite/gotest | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libgo/testsuite/gotest b/libgo/testsuite/gotest index 19cc6be..79e02e2 100755 --- a/libgo/testsuite/gotest +++ b/libgo/testsuite/gotest @@ -618,7 +618,7 @@ xno) wait $pid status=$? if ! test -f gotest-timeout; then - sleeppid=`ps -o pid,ppid,cmd | grep " $alarmpid " | grep sleep | sed -e 's/ *\([0-9]*\) .*$/\1/'` + sleeppid=`ps -o pid,ppid,comm | grep " $alarmpid " | grep sleep | sed -e 's/ *\([0-9]*\) .*$/\1/'` kill $alarmpid wait $alarmpid if test "$sleeppid" != ""; then |