On Wed, Dec 27, 2017 at 10:21:25PM +0100, Lukas Tribus wrote:
> Hello Pieter,
> 
> 
> On Tue, Dec 26, 2017 at 1:08 AM, PiBa-NL <piba.nl....@gmail.com> wrote:
> > Hi Lucas, William,
> >
> > I've made a patch which 'i think' fixes the issue with fclose called 'to
> > often?'.
> > Can you guys verify?
> 
> I can confirm the patch fixes the issue reported; whether it does it
> "the correct way" - I don't know ...
> 
> Maybe William can take a look?
> 

Hi Guys,

The patch seems to fix the issue, but we don't want to reproduce the same
problem again and again, it won't fix everything in my opinion.

I wasn't enthusiastic about the idea of having the pipe of the master and the
poller using the fd 0, 1 and 2; it's confusing during the debugging.
And we don't want to be surprised by libraries trying to write on the FD 1 or 2
for debugging. (glibc or openssl for example)

I think that's better to open /dev/null and dup2 with 0, 1, 2 so we won't have 
any
surprise with an fprintf(stderr, "..  anywhere in the code.

What's difficult with this, is that we need to display the error after the
chroot for the setuid and setgid, and we don't have access to /dev/null after
this, maybe we could open /dev/null in the master, do the chroot/setuid/setgid
and then do the dup2 in the worker.

-- 
William Lallemand

Reply via email to