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

Bug#713967: apache2-bin: daemon doesn't close all fds on fork - which causes postinst with debconf to hang



On Monday 01 July 2013, Markus Frosch wrote:
> Hey Arno,
> 
> > I'm not even sure this is a bug at all. Beyond, it is definitely
> > not a blocker for the Apache transition, or let me rephrase:
> > This list of blocking bugs is not what you think it is meant
> > for.
> 
> It's definetly a bug for me because it causes postinst scripts,
> that restart Apache2, to break while waiting for the debconf fd to
> close. That would be every script that enables configs or modules.
> (while using the new apache2 maintainer scripts)

I don't think this can be fixed in apache itself. There is not even a 
portable way to close all FDs. On Linux you can look in /proc/$PID/fd, 
but I doubt that works on kfreebsd or hurd.

Your postinst scripts should close the debconf FD explicitly. This 
could be done by calling debconf's STOP command before doing the 
restarting. See the debconf-devel(7) man page. Or maybe, if the code 
is generated by dh_apache2, that could close FD 3 before restarting 
apache2.

Cheers,
Stefan


Reply to: