RFR: 8046883 com/sun/jdi/ProcessAttachTest.sh gets "java.io.IOException: Invalid process identifier" on windows

Staffan Larsen staffan.larsen at oracle.com
Tue Jun 17 13:12:58 UTC 2014


On 17 jun 2014, at 15:03, Alan Bateman <Alan.Bateman at oracle.com> wrote:

> On 17/06/2014 13:35, Staffan Larsen wrote:
>> :
>> 
>> It could be a timing issue, but in the other direction. If cygwin hasn’t yet started the real windows process when I run ps, then maybe ps will not list it. But given the “sleep 2” before the ps invocation, the process should have had time to started. No guarantees of course.
>> 
>> Making the sleep shorter will not help as the process we are starting will not terminate until we tell it to.
>> 
>> 
> Okay, although what I was suggesting is to use your patch but additionally move the sleep at L79 into the new while loop so that it doesn't spin quickly through the 10 iterations. That would give the test 10 attempts (and 10 seconds) to get the pid.

Ah, I see. I misunderstood your comment.

I started looking at rewriting the test in pure Java instead of the shell script. With the new Process.getPid() this looks like the best approach. I’ll come back with a new review request soon.

/Staffan



More information about the serviceability-dev mailing list