diff options
author | Joey Hess <joey@kitenet.net> | 2012-02-13 20:23:45 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-02-13 20:23:45 -0400 |
commit | d35a8d85b5ee9ce3d6057300e21729183cce802b (patch) | |
tree | ec53e8eb2e12061282ad7c4cba4dbbccdaa61f9c /Git | |
parent | cad8824852aa0623dc41eac02a9e2bae47d88ec4 (diff) |
another place hGetBoth was used without a writer thread
Diffstat (limited to 'Git')
-rw-r--r-- | Git/Command.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Git/Command.hs b/Git/Command.hs index 3d859ed28..50d4455fe 100644 --- a/Git/Command.hs +++ b/Git/Command.hs @@ -9,6 +9,8 @@ module Git.Command where import qualified Data.Text.Lazy as L import qualified Data.Text.Lazy.IO as L +import Control.Concurrent +import Control.Exception (finally) import Common import Git @@ -61,8 +63,7 @@ pipeWriteRead params s repo = assertLocal repo $ do (p, from, to) <- hPipeBoth "git" (toCommand $ gitCommandLine params repo) fileEncoding to fileEncoding from - hPutStr to s - hClose to + _ <- forkIO $ finally (hPutStr to s) (hClose to) c <- hGetContents from return (p, c) |