[FIX] Specify the signals for the posix environment

bzr revid: stephane@tinyerp.com-20090103013718-q75ueclijh2eqxu1
This commit is contained in:
Stephane Wirtel 2009-01-03 02:37:18 +01:00
parent 3bb427edd1
commit b980050fd5
1 changed files with 6 additions and 1 deletions

View File

@ -171,8 +171,13 @@ if tools.config['netrpc']:
logger.notifyChannel("web-services", netsvc.LOG_INFO,
"starting NET-RPC service, port %d" % (netport,))
LST_SIGNALS = ['SIGINT', 'SIGTERM']
if os.name == 'posix':
LST_SIGNALS.extend(['SIGUSR1','SIGQUIT'])
SIGNALS = dict(
[(getattr(signal, sign), sign) for sign in ('SIGINT', 'SIGTERM', 'SIGUSR1', 'SIGQUIT')]
[(getattr(signal, sign), sign) for sign in LST_SIGNALS]
)
def handler(signum, _):