zephyr_mirror: Fix restart_stamp functionality.

(imported from commit a79db110d3372ab88fabfc0b7013c5fd3ad07f8e)
This commit is contained in:
Tim Abbott 2012-11-19 10:52:17 -05:00
parent 8dd1f1efc0
commit e9bc9ac3c2
1 changed files with 8 additions and 0 deletions

View File

@ -629,6 +629,14 @@ def configure_logger(direction_name):
return logger return logger
if __name__ == "__main__": 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 = optparse.OptionParser()
parser.add_option('--forward-class-messages', parser.add_option('--forward-class-messages',
dest='forward_class_messages', dest='forward_class_messages',