nmh-workers
[Top][All Lists]
Advanced

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

Re: [nmh-workers] closefds() _before_ fork?


From: Ralph Corderoy
Subject: Re: [nmh-workers] closefds() _before_ fork?
Date: Mon, 22 Apr 2019 23:12:03 +0100

Hi Ken,

> Can anyone think of a reason that for this specific case closefds()
> should NOT be moved from whatnowbr.c (and send.c) into sendsbr.c, and
> just in the child process?

IT does seem odd to have it in the parent rather than just the child.
The only thing I can think of is if it's cleaning up some
file-descriptor leak in the parent, especially if one of the still-open
files will be opened anew by the child.  Perhaps closefds() could peer
at /proc/getpid()/fd to see what these FDs that start from three onwards
are?  To test it's working, perhaps a `42>/tmp/foo' when running the
command.

-- 
Cheers, Ralph.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]