in reply to win32 nonblocking waitpid()
I was surprised that this wasn't supported. I checked why, and it kinda sucks. The code for win32_waitpid() [which was written in order to port Perl] accepts a flags argument and just ignores it. And then it goes on to do:
DWORD waitcode = WaitForSingleObject(hProcess, INFINITE);
We need a simple patch that defines WNOHANG as 1 and then does:
DWORD waittime= (WNOHANG&flags) ? 0 : INFINITE; DWORD waitcode = WaitForSingleObject(hProcess, INFINITE);
I don't supposed you'd like to produce such a patch to save me the time, would you? Or at least report it to the perl5-porters.
|
|---|