Skip to content

Commit f87d99c

Browse files
authored
Merge pull request #172 from bgamari/master
Avoid redundant pattern match warning on Windows
2 parents 6f0c644 + 062a69e commit f87d99c

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

System/Process/Windows.hsc

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -330,10 +330,7 @@ interruptProcessGroupOfInternal ph = do
330330
withProcessHandle ph $ \p_ -> do
331331
case p_ of
332332
ClosedHandle _ -> return ()
333-
_ -> do let h = case p_ of
334-
OpenHandle x -> x
335-
OpenExtHandle x _ -> x
336-
_ -> error "interruptProcessGroupOfInternal"
333+
_ -> do let h = phdlProcessHandle p_
337334
#if mingw32_HOST_OS
338335
pid <- getProcessId h
339336
generateConsoleCtrlEvent cTRL_BREAK_EVENT pid

cbits/runProcess.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -875,6 +875,11 @@ waitForJobCompletion ( HANDLE hJob )
875875
sizeof(JOBOBJECT_BASIC_PROCESS_ID_LIST),
876876
NULL);
877877

878+
if (!success) {
879+
maperrno();
880+
return false;
881+
}
882+
878883
if (!success && GetLastError() == ERROR_MORE_DATA) {
879884
process_count *= 2;
880885
free(pid_list);

0 commit comments

Comments
 (0)