Check exit code of processes using jobs in two stages
Previously we would rely on the exit This fixes a few nasty bugs: * System.Process.waitForProcess failed to keep the ProcessHandle's MVar alive, potentially resulting in the finalizer being run while waitForJobCompletion is executing. This would cause the process handles to be closed, resulting in waitForJobCompletion to fail. * waitForProcess failed to explicitly close the job, process, and IOCP handles. * waitForProcess failed to stop delegation of Ctrl-C in processes using jobs.
Showing with 39 additions and 21 deletions