Ah, yes.

The windows “get-the-right-pid” code could be moved to after the "Waiting for 
Debuggee to initialize…” loop. Then we know the process is running. And as you 
say, we could use jps or jcmd to find that pid. 

I’ll try to update the fix.

/Staffan

On 30 jan 2014, at 17:59, Dmitry Samersoff <dmitry.samers...@oracle.com> wrote:

> Staffan,
> 
> No it's not to your code. Sorry for not being clean enough.
> 
> You cleaned up unix code, but windows code remains bad. Particularly, it
> has bad unconditional sleep 2
> 
> I would propose replace *windows manipulation with CYGWIN/MKS pids* to
> call to JPS that return windows pid
> 
> -Dmitry
> 
> On 2014-01-30 20:53, Staffan Larsen wrote:
>> 
>> On 30 jan 2014, at 17:35, Dmitry Samersoff <dmitry.samers...@oracle.com> 
>> wrote:
>> 
>>> Staffan,
>>> 
>>> Looks good for me except windows part.
>> 
>> Can you explain? Do any of my changes make things worse on windows?
>> 
>>> 
>>> Can you replace all this staff with call to ups ?
>> 
>> I don’t think so. I need to know that the process has started _and_ reached 
>> a certain point in the program.
>> 
>> /Staffan
>> 
>>> 
>>> -Dmitry
>>> 
>>> 
>>> On 2014-01-30 20:11, Staffan Larsen wrote:
>>>> webrev: http://cr.openjdk.java.net/~sla/8029808/webrev.00/
>>>> bug: https://bugs.openjdk.java.net/browse/JDK-8029808
>>>> 
>>>> I have tried to improve the stability of this test in a couple of ways.
>>>> 
>>>> - Timeout set to 120s - it should never need to run that long
>>>> - When we start the debugee, we wait for the port-file to become available 
>>>> instead of waiting for output from the process. This should be less racy.
>>>> - stderr output from the debuggee and ShutdownDebuggee programs are 
>>>> captured with the stdout output
>>>> - Moved “sleep 1” to after the check for the port file so the test is 
>>>> faster if the file already exists
>>>> 
>>>> I’m not sure any of these are the cause of the timeout, but at least it 
>>>> should be a bit more stable now.
>>>> 
>>>> /Staffan
>>>> 
>>> 
>>> 
>>> -- 
>>> Dmitry Samersoff
>>> Oracle Java development team, Saint Petersburg, Russia
>>> * I would love to change the world, but they won't give me the sources.
>> 
> 
> 
> -- 
> Dmitry Samersoff
> Oracle Java development team, Saint Petersburg, Russia
> * I would love to change the world, but they won't give me the sources.

Reply via email to