import System.Process
main :: IO ()
main = do
(_, _, _, ph) <-
createProcess $
(proc "sleep" ["21600"]) {use_process_jobs = True}
terminateProcess ph
print =<< waitForProcess ph
On Windows, this may either hang indefinitely or crash with thread blocked indefinitely in an MVar operation. See https://github.com/TerrorJack/repro-201111/runs/1385388481?check_suite_focus=true for the CI log of the repro, using Windows 2019/ghc-8.8.4/process-1.6.9.0.