[FIX] Specify the signals for the posix environment
authorStephane Wirtel <stephane@tinyerp.com>
Sat, 3 Jan 2009 01:37:18 +0000 (02:37 +0100)
committerStephane Wirtel <stephane@tinyerp.com>
Sat, 3 Jan 2009 01:37:18 +0000 (02:37 +0100)
bzr revid: stephane@tinyerp.com-20090103013718-q75ueclijh2eqxu1

bin/openerp-server.py

index 6731e36..a6ac69c 100755 (executable)
@@ -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, _):