Do not use UNIX signals in Windows
This patch does not use the signals in Windows. just avoid these calls. This patch is related to issue #37, issue 3.
This commit is contained in:
parent
09fc0ece61
commit
33f3b4b1aa
@ -26,6 +26,7 @@ import collections
|
||||
from optparse import OptionParser
|
||||
|
||||
import offlineimap
|
||||
from offlineimap.utils.distro_utils import get_os_name
|
||||
import imaplib2 as imaplib
|
||||
|
||||
# Ensure that `ui` gets loaded before `threadutil` in order to
|
||||
@ -457,6 +458,9 @@ class OfflineImap:
|
||||
|
||||
try:
|
||||
self.num_sigterm = 0
|
||||
|
||||
# We cannot use signals in Windows
|
||||
if get_os_name() != 'windows':
|
||||
signal.signal(signal.SIGHUP, sig_handler)
|
||||
signal.signal(signal.SIGUSR1, sig_handler)
|
||||
signal.signal(signal.SIGUSR2, sig_handler)
|
||||
|
Loading…
Reference in New Issue
Block a user