summaryrefslogtreecommitdiff
path: root/Crypto.hs
diff options
context:
space:
mode:
Diffstat (limited to 'Crypto.hs')
-rw-r--r--Crypto.hs5
1 files changed, 4 insertions, 1 deletions
diff --git a/Crypto.hs b/Crypto.hs
index 1f4493b94..41f6b999b 100644
--- a/Crypto.hs
+++ b/Crypto.hs
@@ -199,7 +199,10 @@ gpgPipeStrict params input = do
return output
{- Runs gpg with a cipher and some parameters, feeding it an input,
- - and passing a handle to its output to an action. -}
+ - and passing a handle to its output to an action.
+ -
+ - Note that to avoid deadlock with the cleanup stage,
+ - the action must fully consume gpg's input before returning. -}
gpgCipherHandle :: [CommandParam] -> Cipher -> L.ByteString -> (Handle -> IO a) -> IO a
gpgCipherHandle params c input a = do
-- pipe the passphrase into gpg on a fd