-
Notifications
You must be signed in to change notification settings - Fork 580
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
StartUnixWorker(): don't exit() on fork() failure #8427
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When this case happend, what's the state of the old worker process? Won't this already have ceased operation then and leave the umbrella process in a running state, but nothing is happening anymore? Will the fork be retried automatically?
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So now that I understand more of the code around this, this PR makes more sense to me.
This changes the meaning of the return value -1
, so this should be adjusted as well:
icinga2/lib/cli/daemoncommand.cpp
Line 414 in 96ee6f1
* @return The worker's PID on success, -1 on failure (if the worker couldn't load its config) |
icinga2/lib/cli/daemoncommand.cpp
Lines 736 to 739 in 96ee6f1
pid_t nextWorker = StartUnixWorker(configs); | |
if (nextWorker == -1) { | |
Log(LogCritical, "Application", "Found error in config: reloading aborted"); |
... but let the caller handle the failure. Not to stop working completely just because of fork() failure during a reload.
96ee6f1
to
931b930
Compare
|
... but let the caller handle the failure.
Not to stop working completely just because of fork() failure during a reload.