waitForProcess

Waits for the specified process to terminate, and returns its exit code. On Unix systems, may throw UserInterrupt when using delegate_ctlc. GHC Note: in order to call waitForProcess without blocking all the other threads in the system, you must compile the program with -threaded. Note that it is safe to call waitForProcess for the same process in multiple threads. When the process ends, threads blocking on this call will wake in FIFO order. When using delegate_ctlc and the process is interrupted, only the first waiting thread will throw UserInterrupt. (Since: 1.2.0.0) On Unix systems, a negative value ExitFailure -signum indicates that the child was terminated by signal signum. The signal numbers are platform-specific, so to test for a specific signal use the constants provided by System.Posix.Signals in the unix package. Note: core dumps are not reported, use System.Posix.Process if you need this detail.
Waits for the specified process to terminate, and returns its exit code. GHC Note: in order to call waitForProcess without blocking all the other threads in the system, you must compile the program with -threaded. (Since: 1.2.0.0) On Unix systems, a negative value ExitFailure -signum indicates that the child was terminated by signal signum. The signal numbers are platform-specific, so to test for a specific signal use the constants provided by System.Posix.Signals in the unix package. Note: core dumps are not reported, use System.Posix.Process if you need this detail.
Wait (block) for a sub-process to exit and obtain its exit code.
Same as waitForProcess; provided to avoid breaking backwards compatibility.
Wait for a process to terminate. If it doesn't terminate within gracePeriodUs microseconds, send it an interrupt signal and wait for another gracePeriodUs microseconds. After this time elapses send a terminate signal and wait for the process to die.