On Wed, 2009-09-09 at 14:25 -0400, Dmitri Pal wrote:
Simo Sorce wrote:
> On Wed, 2009-09-09 at 13:33 -0400, Stephen Gallagher wrote:
>> Patch 0001: Ensure that daemonization happens after reading in the
>> configuration, so critical configuration errors repord "FAILED"
>> init script startup.
> Nack, monitor_process_init() performs a number of operations (like
> forking children) that assumes we are operating in the final monitor
> Moving become_daemon() after it would make these children loose, and
> might interfere with other things like signal handlers etc.
> In general I don't think we should do this.
May be instead the children should return a special "invalid config"
status via sbus when monitor connects to them first time?
This would tell monitor to shut down the whole family. What do you
Actually it turns out (thanks Steve) that children are only scheduled to
fork, but not forked until we later enter the server loop.
However here the problem is not about getting feedback from children.
The intent is to parse as much configuration we can to be able to return
an error to the calling init scripts before we fork().
My point though is that I don't want to risk having bugs introduced by
moving the fork around just to please init scripts, esp. when we may
still have backends failing later on after the, already daemonized,
monitor starts to fork them.
Any change of this magnitude imo need a better justification although I
am not opposed to trying to give back better feedback to init scripts if
Simo Sorce * Red Hat, Inc * New York