close stdin handles before waiting on commands
Fixes reversion in recent conversions, the old code relied on the GC apparently, but the new code explicitly waits on the process, so must close stdin handle first or the command will never exit.
This commit is contained in:
parent
ef0024444b
commit
e41f8c83f3
2 changed files with 7 additions and 7 deletions
|
@ -166,10 +166,10 @@ store' r k b p = go =<< glacierEnv c gc u
|
|||
let cmd = (proc "glacier" (toCommand params)) { env = Just e }
|
||||
{ std_in = CreatePipe }
|
||||
in liftIO $ withCreateProcess cmd (go' cmd)
|
||||
go' cmd (Just hin) _ _ pid =
|
||||
forceSuccessProcess cmd pid
|
||||
`after`
|
||||
go' cmd (Just hin) _ _ pid = do
|
||||
meteredWrite p hin b
|
||||
hClose hin
|
||||
forceSuccessProcess cmd pid
|
||||
go' _ _ _ _ _ = error "internal"
|
||||
|
||||
retrieve :: Remote -> Retriever
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue