propagate signals to the transferrer process group
Done on unix, could not implement it on windows quite. The signal library gets part of the way needed for windows. But I had to open https://github.com/pmlodawski/signal/issues/1 because it lacks raiseSignal. Also, I don't know what the equivilant of getProcessGroupIDOf is on windows. And System.Process does not provide a way to send any signal to a process group except for SIGINT. This commit was sponsored by Boyd Stephen Smith Jr. on Patreon.
This commit is contained in:
parent
79c765b727
commit
d3f78da0ed
17 changed files with 150 additions and 48 deletions
|
@ -93,7 +93,9 @@ runTransferThread' mkcheck program batchmaker d run = go
|
|||
go = catchPauseResume $ do
|
||||
p <- runAssistant d $ liftAnnex $
|
||||
Annex.getState Annex.transferrerpool
|
||||
withTransferrer' True mkcheck program batchmaker p run
|
||||
signalactonsvar <- runAssistant d $ liftAnnex $
|
||||
Annex.getState Annex.signalactions
|
||||
withTransferrer' True signalactonsvar mkcheck program batchmaker p run
|
||||
pause = catchPauseResume $
|
||||
runEvery (Seconds 86400) noop
|
||||
{- Note: This must use E.try, rather than E.catch.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue