Skip to content
This repository was archived by the owner on Mar 8, 2018. It is now read-only.
This repository was archived by the owner on Mar 8, 2018. It is now read-only.

Daemonizing before SIGHUP handler is installed. #33

@nicholasknight

Description

@nicholasknight

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."

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions