summaryrefslogtreecommitdiffhomepage
path: root/Gpg.hs
diff options
context:
space:
mode:
authorJoey Hess <joeyh@joeyh.name>2016-08-18 15:49:47 -0400
committerJoey Hess <joeyh@joeyh.name>2016-08-18 15:49:47 -0400
commit4e53adca698bde2430f30a6b1bd10bf7cdd52e1e (patch)
treee5a52933bdd597b599a4c25b10e06dd5cd6dd24c /Gpg.hs
parent07afb8fc1eb3a850b13f7aa09cc0ca3b0b495a2c (diff)
downloadkeysafe-4e53adca698bde2430f30a6b1bd10bf7cdd52e1e.tar.gz
fix deadlock
Diffstat (limited to 'Gpg.hs')
-rw-r--r--Gpg.hs2
1 files changed, 2 insertions, 0 deletions
diff --git a/Gpg.hs b/Gpg.hs
index f8651e3..de45c45 100644
--- a/Gpg.hs
+++ b/Gpg.hs
@@ -12,6 +12,7 @@ import UI
import System.Process
import Data.List.Split
import Data.Maybe
+import System.IO
import System.Exit
import qualified Data.ByteString as B
import qualified Data.ByteString.UTF8 as BU8
@@ -61,6 +62,7 @@ writeSecretKey (SecretKey b) = do
(Just hin, _, _, ph) <- createProcess (proc "gpg" ps)
{ std_in = CreatePipe }
B.hPut hin b
+ hClose hin
exitcode <- waitForProcess ph
case exitcode of
ExitSuccess -> return ()