diff options
| author | bwarsaw | 2001-04-02 06:09:56 +0000 |
|---|---|---|
| committer | bwarsaw | 2001-04-02 06:09:56 +0000 |
| commit | 51df6539c44baefcfce2e777efc22190ffad47b9 (patch) | |
| tree | 47be9fa37f71a49c4f24abd9fa357a505801d490 | |
| parent | d04299c5f089bf7ef901ba69c007d88c8162f600 (diff) | |
| download | mailman-51df6539c44baefcfce2e777efc22190ffad47b9.tar.gz mailman-51df6539c44baefcfce2e777efc22190ffad47b9.tar.zst mailman-51df6539c44baefcfce2e777efc22190ffad47b9.zip | |
master(): Rework the while 1 loop so that it's inside the try/except
KeyboardError instead of outside it. This prevents the anomolous
tracebacks that sometimes occur when ^C is used to kill qrunner.
| -rw-r--r-- | cron/qrunner | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/cron/qrunner b/cron/qrunner index 55b56c661..68e45e266 100644 --- a/cron/qrunner +++ b/cron/qrunner @@ -164,8 +164,8 @@ def master(restart, lock): else: restarting = '' try: - while 1: - try: + try: + while 1: pid, status = os.wait() killsig = status & 0xff exitstatus = (status >> 8) & 0xff @@ -189,8 +189,8 @@ qrunner watchdog detected subprocess exit if restart: newpid = start_runner(qrclass, slice, count) kids[newpid] = (qrclass, slice, count) - except KeyboardInterrupt: - break + except KeyboardInterrupt: + pass finally: # Should we leave the main loop for any reason, we want to be sure all # of our children are exited cleanly. Send SIGINTs to all the child |
