diff options
Diffstat (limited to 'Mailman/Utils.py')
| -rw-r--r-- | Mailman/Utils.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/Mailman/Utils.py b/Mailman/Utils.py index 327583f68..77f8bb669 100644 --- a/Mailman/Utils.py +++ b/Mailman/Utils.py @@ -593,3 +593,16 @@ def GetRequestURI(fallback=None): return os.environ['SCRIPT_NAME'] + os.environ['PATH_INFO'] else: return fallback + + + +# Wait on a dictionary of child pids +def reap(kids): + while kids: + pid, status = os.waitpid(-1, os.WNOHANG) + if pid <> 0: + try: + del kids[pid] + except KeyError: + # Huh? How can this happen? + pass |
