On Wed, Aug 04, 2010 at 04:09:52AM +0100, Ben Hutchings wrote:
> On Wed, 2010-08-04 at 03:29 +0100, Colin Watson wrote:
> > On Wed, Aug 04, 2010 at 12:36:00AM +0100, Ben Hutchings wrote:
> > > On Wed, 2010-08-04 at 00:13 +0100, Colin Watson wrote:
> > > > The simple fix should be to put 3>&- at the end of each of the
> > > > update-inetd invocations, so that update-inetd is always disconnected
> > > > from debconf.
> > > 
> > > This seems like a bug in update-inetd which should not have to be
> > > worked-around in every maintainer script.
> > 
> > I see your point, although I think I could make a reasonably convincing
> > argument either way.  The opposing position is that it's the postinst
> > script that's using debconf, not update-inetd, and therefore the
> > postinst should clean up after itself by not passing the extra open fd
> > on to update-inetd.
> 
> This seems like a standard part of detaching a daemon from its parent
> process.

Well, I wouldn't mind inetd (as opposed to update-inetd) doing the usual
close-all-file-descriptors dance.  But evidently some inetds don't, so
that changes the problem to one of going round all the inetds ...  Doing
it in update-inetd would be a bit odd, I think, since it's not the only
place where inetd might be started.

Anyway, I think there is little harm in making this change in pawserv,
since it doesn't preclude a more complete fix somewhere else.

> Ideally the debconf shell module would set FD_CLOEXEC for fd
> 3, but that doesn't appear to be possible in a shell script.

That would break a number of common cases where a shell script that has
sourced /usr/share/debconf/confmodule forks and execs another shell
script that in turn also sources /usr/share/debconf/confmodule.  This is
something we explicitly want to support.

debconf-devel(7)'s HACKS section comments on the general issue here and
suggests a different long-term approach.  Unfortunately, of course, it's
hard, which is why it hasn't been done in ten years of debconf
development, so it would be best not to hold your breath for it.

-- 
Colin Watson                                       [cjwat...@debian.org]



-- 
To UNSUBSCRIBE, email to debian-bugs-rc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to