Spawning is a wsgi server which supports multiple processes, multiple threads, green threads, non-blocking HTTP io, and automatic graceful upgrading of code
I just spent an hour trying to figure out why an automatic deployment process was failing intermittently on certain servers, when I finally realized what was going on.
Spawning is daemonizing in spawning_controller.py:main(), starting around line 402, before eventually calling start_controller(), which calls Controller.run(), which in turn, finally calls signal.signal(signal.SIGHUP, self.handle_sighup).
Thus, if a controlling terminal goes away too fast after spawning forks into the background, spawning gets SIGHUP before the handler is installed, and dies.
This should be pretty easy to reproduce by doing something like:
I just spent an hour trying to figure out why an automatic deployment process was failing intermittently on certain servers, when I finally realized what was going on.
Spawning is daemonizing in spawning_controller.py:main(), starting around line 402, before eventually calling start_controller(), which calls Controller.run(), which in turn, finally calls
signal.signal(signal.SIGHUP, self.handle_sighup)
.Thus, if a controlling terminal goes away too fast after spawning forks into the background, spawning gets SIGHUP before the handler is installed, and dies.
This should be pretty easy to reproduce by doing something like:
ssh -t user@host "spawning etc.etc."