From ce279d48ae0e7f5cd5bb27188dfede0716fe21a1 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Mon, 19 Nov 2012 10:52:17 -0500 Subject: [PATCH] zephyr_mirror: Fix restart_stamp functionality. (imported from commit a79db110d3372ab88fabfc0b7013c5fd3ad07f8e) --- bots/zephyr_mirror.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bots/zephyr_mirror.py b/bots/zephyr_mirror.py index 26a22d7..f15ee70 100755 --- a/bots/zephyr_mirror.py +++ b/bots/zephyr_mirror.py @@ -629,6 +629,14 @@ def configure_logger(direction_name): return logger if __name__ == "__main__": + # Set the SIGCHLD handler back to SIG_DFL to prevent these errors + # when importing the "requests" module after being restarted using + # the restart_stamp functionality: + # + # close failed in file object destructor: + # IOError: [Errno 10] No child processes + signal.signal(signal.SIGCHLD, signal.SIG_DFL) + parser = optparse.OptionParser() parser.add_option('--forward-class-messages', dest='forward_class_messages',