[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.
- [nmh-workers] closefds() _before_ fork?, Ken Hornstein, 2019/04/22
- Re: [nmh-workers] closefds() _before_ fork?,
Ralph Corderoy <=
- Re: [nmh-workers] closefds() _before_ fork?, David Levine, 2019/04/22
- Re: [nmh-workers] closefds() _before_ fork?, Ken Hornstein, 2019/04/22
- Re: [nmh-workers] closefds() _before_ fork?, David Levine, 2019/04/22
- Re: [nmh-workers] closefds() _before_ fork?, Tom Lane, 2019/04/22
- Re: [nmh-workers] closefds() _before_ fork?, Ken Hornstein, 2019/04/22
- Re: [nmh-workers] closefds() _before_ fork?, Ralph Corderoy, 2019/04/23
- Re: [nmh-workers] closefds() _before_ fork?, Valdis Klētnieks, 2019/04/23
- Re: [nmh-workers] closefds() _before_ fork?, Ken Hornstein, 2019/04/23
- Re: [nmh-workers] closefds() _before_ fork?, Robert Elz, 2019/04/23
- Re: [nmh-workers] closefds() _before_ fork?, Valdis Klētnieks, 2019/04/23