summaryrefslogtreecommitdiff
path: root/Pancake.hs
diff options
context:
space:
mode:
authordefanor <defanor@uberspace.net>2017-10-28 05:30:42 +0300
committerdefanor <defanor@uberspace.net>2017-10-28 05:30:42 +0300
commitd2460666e8bffdc4079777755e19420b6777d134 (patch)
tree9a524f34ea1e7d9adc273b57794064045b74cbc3 /Pancake.hs
parentdf97f9ad38e54107ef433ccd00d67b9315701b2b (diff)
Support interruptions
This is mostly to kill curl processes that take too long to finish.
Diffstat (limited to 'Pancake.hs')
-rw-r--r--Pancake.hs3
1 files changed, 2 insertions, 1 deletions
diff --git a/Pancake.hs b/Pancake.hs
index 62ef0dd..49f2868 100644
--- a/Pancake.hs
+++ b/Pancake.hs
@@ -81,7 +81,8 @@ retrieve cmd uri = do
>> pure BS.empty) $
withCreateProcess ((shell cmd) { env = Just environment
, std_out = CreatePipe
- , std_err = CreatePipe }) $
+ , std_err = CreatePipe
+ , delegate_ctlc = True }) $
\_ stdout stderr ph -> case stdout of
Nothing -> putErrLn "No stdout" >> pure BS.empty
Just stdout' -> do