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.
-Alan