mirror of git://gcc.gnu.org/git/gcc.git
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
This commit is contained in:
parent
7c285ab9ae
commit
de41ebf5dd
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue