diff --git a/System/Process/Windows.hsc b/System/Process/Windows.hsc index 16080e4cdd99f6dba11cb919540d526edf60ab4e..1a0b794d5e586de1dcd84437be142ace4974f800 100644 --- a/System/Process/Windows.hsc +++ b/System/Process/Windows.hsc @@ -330,10 +330,7 @@ interruptProcessGroupOfInternal ph = do withProcessHandle ph $ \p_ -> do case p_ of ClosedHandle _ -> return () - _ -> do let h = case p_ of - OpenHandle x -> x - OpenExtHandle x _ -> x - _ -> error "interruptProcessGroupOfInternal" + _ -> do let h = phdlProcessHandle p_ #if mingw32_HOST_OS pid <- getProcessId h generateConsoleCtrlEvent cTRL_BREAK_EVENT pid diff --git a/cbits/runProcess.c b/cbits/runProcess.c index 3098bca2815d9d9e8378b67e7be6ef6eb0d2adb7..7cf1997022a5cfa28ffa247c67e0b2c3297f589d 100644 --- a/cbits/runProcess.c +++ b/cbits/runProcess.c @@ -875,6 +875,11 @@ waitForJobCompletion ( HANDLE hJob ) sizeof(JOBOBJECT_BASIC_PROCESS_ID_LIST), NULL); + if (!success) { + maperrno(); + return false; + } + if (!success && GetLastError() == ERROR_MORE_DATA) { process_count *= 2; free(pid_list);