From c6c04581a8567e6b87c8df754947ac8779845507 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 1 Dec 2013 14:56:37 -0400 Subject: assistant: Run transferkeys as batch jobs. --- Assistant/TransferrerPool.hs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'Assistant') diff --git a/Assistant/TransferrerPool.hs b/Assistant/TransferrerPool.hs index bb4648731..79b609a1d 100644 --- a/Assistant/TransferrerPool.hs +++ b/Assistant/TransferrerPool.hs @@ -12,6 +12,7 @@ module Assistant.TransferrerPool where import Assistant.Common import Assistant.Types.TransferrerPool import Logs.Transfer +import Utility.Batch #ifndef mingw32_HOST_OS import qualified Command.TransferKeys as T @@ -63,9 +64,11 @@ mkTransferrer program = do , Param "--readfd", Param $ show tread , Param "--writefd", Param $ show twrite ] + {- It runs as a batch job. -} + (program', params') <- toBatchCommand (program, params) {- It's put into its own group so that the whole group can be - killed to stop a transfer. -} - (_, _, _, pid) <- createProcess (proc program $ toCommand params) + (_, _, _, pid) <- createProcess (proc program' $ toCommand params') { create_group = True } closeFd twrite closeFd tread -- cgit v1.2.3