[Zodb-checkins] CVS: ZODB3/zdaemon - Daemon.py:1.23
Fred L. Drake, Jr.
fred at zope.com
Fri Jan 2 17:25:07 EST 2004
Update of /cvs-repository/ZODB3/zdaemon
In directory cvs.zope.org:/tmp/cvs-serv22768
Modified Files:
Daemon.py
Log Message:
tolerate signals missing on some platforms, so the Windows holdouts
don't get too annoyed ;-)
=== ZODB3/zdaemon/Daemon.py 1.22 => 1.23 ===
--- ZODB3/zdaemon/Daemon.py:1.22 Fri Jan 2 16:14:11 2004
+++ ZODB3/zdaemon/Daemon.py Fri Jan 2 17:25:03 2004
@@ -33,14 +33,14 @@
if signum in [signal.SIGTERM, signal.SIGINT]:
raise DieNow
-PASSED_SIGNALS = (
- signal.SIGHUP,
- signal.SIGINT,
- signal.SIGQUIT,
- signal.SIGUSR1,
- signal.SIGUSR2,
- signal.SIGTERM,
- )
+
+PASSED_SIGNALS = ()
+
+for signame in ("SIGHUP", "SIGINT", "SIGQUIT",
+ "SIGUSR1", "SIGUSR2", "SIGTERM"):
+ if hasattr(signal, signame):
+ PASSED_SIGNALS += (getattr(signal, signame),)
+
def run(argv, pidfile=''):
if os.environ.has_key('ZDAEMON_MANAGED'):
More information about the Zodb-checkins
mailing list