Yelp / zygote

A Python HTTP process management utility.
http://opensource.yelp.com/
Apache License 2.0
40 stars 15 forks source link

Reset SIGCHLD handler after forking worker's child #49

Closed eskil closed 11 years ago

eskil commented 11 years ago

In zygote/worker.py, we set a SIGCHLD handler to reap children. Then we fork the child.

This means the child is runnig with a SIGCHLD handler that points to ZygoteWorker.reap_child. This interferes with using python's subprocess module which apparently uses SIGCHLD handlers.

This is fixed with python 2.7, http://bugs.python.org/issue9127

I propose adding ;

signal.signal(signal.SIGCHLD, signal.SIG_DFL)

to establish_signal_handlers for the worker.

baris commented 11 years ago

Fixed with #50.