avoid crash on EOF at end
authorJoey Hess <joeyh@joeyh.name>
Wed, 18 Nov 2020 19:03:30 +0000 (15:03 -0400)
committerJoey Hess <joeyh@joeyh.name>
Wed, 18 Nov 2020 19:03:30 +0000 (15:03 -0400)
Utility/Process.hs

index 1348e9ee92a387aa5d4603e487af81279a3e8743..958d239069e8ab3565c0f00cb245e3cbc60b356c 100644 (file)
@@ -270,7 +270,7 @@ hGetLineUntilExitOrEOF ph h = go []
                                Just _ -> finalcheck buf
 
        finalcheck buf = do
-               ready <- hWaitForInput h 0
+               ready <- waitforinputorerror 0
                if ready
                        then getloop buf finalcheck
                        -- No remaining buffered input, though the handle