diff options
author | Joey Hess <joey@kitenet.net> | 2013-12-10 23:32:10 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-12-10 23:48:42 -0400 |
commit | 62d93c99ce45d2f3cd486874cb0c2cd719527146 (patch) | |
tree | 2be7c769ab4964c61c7ad646f4483f9fbcc32017 /Assistant | |
parent | f864a68220a0d77b5b6a5c3f4f25743e8e76aae0 (diff) |
different PID types for Unix and Windows
Windows has a larger (unsigned) PID space, so cannot use the unix CInt
there.
Note that TransferInfo does not yet ever get the TransferPid populated,
as there is missing locking.
Diffstat (limited to 'Assistant')
-rw-r--r-- | Assistant/TransferSlots.hs | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/Assistant/TransferSlots.hs b/Assistant/TransferSlots.hs index da92bbf0b..308d68408 100644 --- a/Assistant/TransferSlots.hs +++ b/Assistant/TransferSlots.hs @@ -260,13 +260,15 @@ cancelTransfer pause t = do killproc pid = void $ tryIO $ do #ifndef mingw32_HOST_OS g <- getProcessGroupIDOf pid - void $ tryIO $ signalProcessGroup sigTERM g + let signal sig = void $ tryIO $ signalProcessGroup sig g + signal sigTERM graceperiod - void $ tryIO $ signalProcessGroup sigKILL g + signal sigKILL #else - void $ tryIO $ generateConsoleCtrlEvent cTRL_C_EVENT pid + let singnal sig = void $ tryIO $ generateConsoleCtrlEvent sig pid + signal cTRL_C_EVENT graceperiod - void $ tryIO $ generateConsoleCtrlEvent cTRL_BREAK_EVENT pid + signal cTRL_BREAK_EVENT #endif graceperiod = threadDelay 50000 -- 0.05 second |