diff --git a/jdk/test/com/sun/jdi/ProcessAttachTest.sh b/jdk/test/com/sun/jdi/ProcessAttachTest.sh index 10b5d503154..76a531bad38 100644 --- a/jdk/test/com/sun/jdi/ProcessAttachTest.sh +++ b/jdk/test/com/sun/jdi/ProcessAttachTest.sh @@ -87,7 +87,7 @@ startDebuggee() # "java" process. if [ "$OS" = "Windows" ]; then sleep 2 - pid=`ps -o pid,ppid,comm|grep ${startpid}|grep "java"|cut -c1-6` + pid=`ps -o pid,ppid,comm | awk '/${startpid}.+java/{ print $1 }'` fi echo "Waiting for Debuggee to initialize..."