diff options
author | Joey Hess <joeyh@joeyh.name> | 2020-12-11 15:28:58 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2020-12-11 15:32:00 -0400 |
commit | d3f78da0ed4e298572c698ea39a5fea03bcd3e07 (patch) | |
tree | dc85a08366f3434c083bc9d31bf1ad3a1dcb205e /Types/CleanupActions.hs | |
parent | 79c765b72701778846854ddc0a73d093cada63ad (diff) |
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.
Diffstat (limited to 'Types/CleanupActions.hs')
-rw-r--r-- | Types/CleanupActions.hs | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/Types/CleanupActions.hs b/Types/CleanupActions.hs index 23dc7e748a..418472ef3e 100644 --- a/Types/CleanupActions.hs +++ b/Types/CleanupActions.hs @@ -1,6 +1,6 @@ {- Enumeration of cleanup actions - - - Copyright 2014 Joey Hess <id@joeyh.name> + - Copyright 2014-2020 Joey Hess <id@joeyh.name> - - Licensed under the GNU AGPL version 3 or higher. -} @@ -8,9 +8,10 @@ module Types.CleanupActions where import Types.UUID - import Utility.Url +import System.Process (Pid) + data CleanupAction = RemoteCleanup UUID | StopHook UUID @@ -20,3 +21,7 @@ data CleanupAction | TorrentCleanup URLString | OtherTmpCleanup deriving (Eq, Ord) + +data SignalAction + = PropagateSignalProcessGroup Pid + deriving (Eq, Ord) |