Mike Gelfand 0425866486 Allow for process termination when polling with isRunning
On *NIX, one needs to call `waitpid()` in order for process to exit the
zombie state. If one uses `Process::isRunning()` to emulate non-blocking
wait for child process termination, process will stay zombie and function
will always return true.

This commit changes `Process::isRunning()` to call `waitpid()` with
`WNOHANG` instead of using `kill()` when checking for child process (i.e.
the one we have ProcessHandle for), which allows for process termination.
Additional trickery with mutex and event is needed to prevent exceptions
when `Process::isRunning()` and/or `Process::wait()` is called concurrently
on the same handle from different threads.

Fixes #1097.
2016-01-09 02:36:55 +03:00
..
2012-04-23 01:14:34 +00:00
2015-12-12 14:20:33 +01:00
2012-07-10 03:58:41 +00:00
2012-04-29 18:52:25 +00:00
2012-04-29 18:52:25 +00:00
2012-04-23 01:14:34 +00:00
2012-04-23 01:14:34 +00:00
2015-03-22 17:30:03 +01:00
2015-03-19 23:22:00 -05:00
2015-03-22 17:30:03 +01:00