Re: [Exim] Re: Exim 4.33 local_scan() problem

Pàgina inicial
Delete this message
Reply to this message
Autor: Andrew - Supernews
Data:  
A: exim-users
Assumpte: Re: [Exim] Re: Exim 4.33 local_scan() problem
>>>>> "Richard" == Richard Hall <Richard.Hall@???> writes:

>>> If you close stderr and don't plan on immediately reopening it, then
>>> always, always point it at /dev/null instead.


>> Good plan. I'm not sure what the reasons are for closing the fds
>> (getting rid of a terminal!?), but I'll leave that to Philip. The
>> problem is big, since a lot of code is now linked into exim that may
>> sputter to fds 1/2 under some circumstances ...



Richard> BUT BUT BUT ... from ChangeLog-4.21:-

Richard> 72. When Exim is about to re-exec itself, it ensures that
Richard> the file descriptors 0, 1, and 2 exist,

But the issue is what about when Exim _doesn't_ re-exec itself.

The change in 4.21 was clearly misguided; it patches over the
superficially-visible problem (missing descriptors complained about by
the OS during exec) without addressing the underlying problem (that
Exim is running around executing a lot of code, some of which is
potentially executing embedded interpreters or calling into
non-trivial libraries, without having a valid descriptor open on
stderr).

There seem to be two main places to fix - daemon_go() in daemon.c, and
close_unwanted() in exim.c.

--
Andrew, Supernews
http://www.supernews.com