diff options
| author | bwarsaw | 2001-06-02 05:13:52 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-06-02 05:13:52 +0000 |
| commit | c0ec1c21b894562dbd3bafbf0f14761de892d687 (patch) | |
| tree | 5a3f4e8bac0d01f6af63dcc9ab2bcf350cb05f64 | |
| parent | 2d1cfb8f3d78b35fc7717538302e6f5aa76aa316 (diff) | |
| download | mailman-c0ec1c21b894562dbd3bafbf0f14761de892d687.tar.gz mailman-c0ec1c21b894562dbd3bafbf0f14761de892d687.tar.zst mailman-c0ec1c21b894562dbd3bafbf0f14761de892d687.zip | |
| -rw-r--r-- | cron/qrunner | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/cron/qrunner b/cron/qrunner index c962af3ac..07ad9d0dc 100644 --- a/cron/qrunner +++ b/cron/qrunner @@ -106,6 +106,15 @@ LOCKFILE = os.path.join(mm_cfg.LOCK_DIR, 'master-qrunner') LOCK_LIFETIME = mm_cfg.days(10) SNOOZE = mm_cfg.days(1) +# We want a SIGHUP to re-open all the log files. By closing syslog, it will +# cause a new StampedLogger to be opened the next time a message is logged. +def sighup_handler(signum, frame): + syslog.close() + # And just to tweak things... + syslog('qrunner', 'qrunner caught SIGHUP. Re-opening log files.') + +signal.signal(signal.SIGHUP, sighup_handler) + def usage(code, msg=''): @@ -174,7 +183,12 @@ def master(restart, lock): try: try: while 1: - pid, status = os.wait() + try: + pid, status = os.wait() + except OSError, e: + if e.errno <> errno.EINTR: raise + # Just restart the wait() + continue killsig = status & 0xff exitstatus = (status >> 8) & 0xff # What should we do with this information other than log it? |
