Attempt to force subprocess output to use linewise buffering
parent
49ffea3f2e
commit
7125e0e5b6
|
@ -853,6 +853,8 @@ main = B.mainFromCmdParser $ do
|
||||||
let mainBlock =
|
let mainBlock =
|
||||||
P.withCreateProcess ((P.proc restPath restArgs) { P.std_in = P.CreatePipe, P.std_out = P.CreatePipe, P.std_err = P.CreatePipe, P.env = Just innerEnv })
|
P.withCreateProcess ((P.proc restPath restArgs) { P.std_in = P.CreatePipe, P.std_out = P.CreatePipe, P.std_err = P.CreatePipe, P.env = Just innerEnv })
|
||||||
$ \(Just inp) (Just out) (Just err) hdl -> do
|
$ \(Just inp) (Just out) (Just err) hdl -> do
|
||||||
|
System.IO.hSetBuffering out System.IO.LineBuffering
|
||||||
|
System.IO.hSetBuffering err System.IO.LineBuffering
|
||||||
A.withAsync (inHandler inp) $ \inAsync -> A.withAsync (outHandler out) $ \outAsync -> A.withAsync (errHandler err) $ \errAsync ->
|
A.withAsync (inHandler inp) $ \inAsync -> A.withAsync (outHandler out) $ \outAsync -> A.withAsync (errHandler err) $ \errAsync ->
|
||||||
A.withAsync tickHandler $ \_tickAsync -> do
|
A.withAsync tickHandler $ \_tickAsync -> do
|
||||||
ec <- P.waitForProcess hdl
|
ec <- P.waitForProcess hdl
|
||||||
|
|
Loading…
Reference in New Issue