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
..
2015-04-10 11:31:12 +01:00
2015-04-10 11:31:12 +01:00
2015-04-10 11:31:12 +01:00
2015-04-10 11:31:12 +01:00
2015-04-06 17:56:13 +01:00
2015-04-10 11:43:49 +01:00
2015-04-10 11:43:49 +01:00
2015-03-23 23:20:15 +01:00
2015-03-23 23:20:15 +01:00
2015-01-01 12:35:26 -06:00
2015-04-10 11:31:12 +01:00
2015-04-10 11:31:12 +01:00
2015-04-10 11:43:49 +01:00
2015-04-10 11:31:12 +01:00
2015-04-10 11:31:12 +01:00
2015-04-10 11:31:12 +01:00
2015-03-23 23:20:15 +01:00
2015-03-23 23:20:15 +01:00
2015-04-06 17:34:48 +01:00
2015-04-10 11:31:12 +01:00
2015-12-11 15:18:50 -02:00
2015-09-08 17:36:28 +02:00
2014-08-11 17:21:53 +03:00
2014-08-11 17:21:53 +03:00
2014-08-11 17:21:53 +03:00
2014-08-11 17:21:53 +03:00
2014-08-11 17:21:53 +03:00
2014-08-11 17:21:53 +03:00
2015-04-10 11:31:12 +01:00
2015-04-10 11:31:12 +01:00
2015-04-10 11:31:12 +01:00
2015-04-10 11:31:12 +01:00
2015-04-10 11:31:12 +01:00
2015-04-10 11:31:12 +01:00
2014-09-08 16:27:42 -07:00
2014-05-21 03:28:24 -05:00
2015-04-10 11:31:12 +01:00
2015-12-07 17:31:49 +01:00
2015-09-08 17:36:28 +02:00
2013-06-09 20:32:03 +02:00
2013-06-09 20:32:03 +02:00