[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: My cdebconf is escaped !

On Wed, 2012-02-01 at 11:57 -0400, Joey Hess wrote:
> Regis Boudin wrote:
> >  * ejabberd. During postinst, cdebconf seems to wait indefinitely on the
> > read() in confmodule.c, line 109. The problem only occurs if
> > "invoke-rc.d ejabberd start" is called during the postinst script,
> > though.
> Sounds like the typical problem of a daemon inheriting the confmodule
> FD, or something to do with STOP handling. The ejabberd postinst
> does send a STOP.
> Debconf/CondModule.pm special-cases the stop command, so it does
> not send a reply to it.
> Looks to me like cdebconf's command_stop returns a reply to stop. Quite
> likely it blocks forever, since the client confmodule does not read
> that reply.

Ok, I believe (or at least hope) I've now implemented the STOP command
correctly, by adding a waitpid() to the processing of the command.
I used the same logic that was commented out nearly 10 years ago,
relying on the call to STOP to return an empty string, and be the only
one to do so. Please shout if this is wrong.

The other change I applied was actually setting mod->pid in
confmodule_run(). The variable was never set before, so probably left to
0. Colin seems to be the latest person to have modified these bits. Any
opinion ?

Monkeysphere seems to run its postscrit happily, sod does ejabberd, so
I'm left without any known case of cdebconf having issues with scripts.
I would be quite keen to make a release soon, unless someone knows of
issues with what I did with the STOP related commits.


Reply to: