Clean up multiprocessing processes on SIGTERM #800

Merged
merged 1 commit into from Mar 1, 2012

Conversation

Projects
None yet
2 participants
@grierj
Contributor

grierj commented Mar 1, 2012

First pass at cleaning up the processes spawned by the salt master
when run in the foreground via some process minder like runit or
daemontools.

This current method is a little inelegant as the cleanup code gets
pulled into the child processes themselves and you waste a few cycles
trying to clean proc objects from the children in the clean_proc() function.

That being said, it works and doesn't orphan processes. I'm open to
better ways to do it, but I didn't want to do any major surgery right
at the moment. I'm not opposed to it, I just had a pressing need, but
I can work on a more integrated solution in the future.

Clean up multiprocessing processes on SIGTERM
First pass at cleaning up the processes spawned by the salt master
when run in the foreground via some process minder like runit or
daemontools.

This current method is a little inelegant as the cleanup code gets
pulled into the child processes themselves and you waste a few cycles
trying to test the proc objects in the clean_proc() function.

That being said, it works and doesn't orphan processes.

thatch45 added a commit that referenced this pull request Mar 1, 2012

Merge pull request #800 from grierj/contribute
Clean up multiprocessing processes on SIGTERM

@thatch45 thatch45 merged commit 9fb95d0 into saltstack:develop Mar 1, 2012

@thatch45

This comment has been minimized.

Show comment Hide comment
@thatch45

thatch45 Mar 1, 2012

Member

This is a serious enhancement, thanks Grier!

Member

thatch45 commented Mar 1, 2012

This is a serious enhancement, thanks Grier!

whiteinge pushed a commit to whiteinge/salt that referenced this pull request Nov 8, 2013

Merge pull request #800 from techhat/softlayerbm
Updating softlayer docs to include hardware configs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment