On 17 jun 2014, at 15:03, Alan Bateman <alan.bate...@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