getAnyProcessStatus

getAnyProcessStatus :: Bool -> Bool -> IO (Maybe (ProcessID, ProcessStatus))
unix System.Posix.Process.ByteString, unix System.Posix.Process
getAnyProcessStatus blk stopped calls waitpid, returning Just (pid, tc), the ProcessID and ProcessStatus for any child process if a child process has exited, or Nothing if there are child processes but none have exited. If there are no child processes, then getAnyProcessStatus raises an isDoesNotExistError exception. If blk is False, then WNOHANG is set in the options for waitpid, otherwise not. If stopped is True, then WUNTRACED is set in the options for waitpid, otherwise not.