Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workers deleting pidfile because of inherited at_exit handler #334

Closed
srgpqt opened this issue Jul 18, 2013 · 1 comment
Closed

Workers deleting pidfile because of inherited at_exit handler #334

srgpqt opened this issue Jul 18, 2013 · 1 comment

Comments

@srgpqt
Copy link

srgpqt commented Jul 18, 2013

In daemon mode, when a worker process exits (for example, in a phased-restart) it will delete the main process pidfile.

This is because forked workers inherit the parent process' at_exit handlers and at_exit is used for deleting the pidfile like so : at_exit { delete_pidfile }

This is undesirable -- monitoring programs like monit think the daemon has shut down because the pidfile is missing.

I'm not sure how this could be handled better. Add a check in delete_pidfile to make sure only the parent process deletes the file? Or use something other than at_exit?

@srgpqt
Copy link
Author

srgpqt commented Jul 20, 2013

Thanks for the quick fix!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant