Re: File descriptors in exec'd subprocesses

Thomas Munro <thomas.munro@gmail.com>

From: Thomas Munro <thomas.munro@gmail.com>
To: "Gregory Stark (as CFM)" <stark.cfm@gmail.com>
Cc: Andres Freund <andres@anarazel.de>, pgsql-hackers@lists.postgresql.org, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2023-03-02T22:04:21Z
Lists: pgsql-hackers

Attachments

On Thu, Mar 2, 2023 at 9:57 AM Thomas Munro <thomas.munro@gmail.com> wrote:
> On Thu, Mar 2, 2023 at 9:49 AM Gregory Stark (as CFM)
> <stark.cfm@gmail.com> wrote:
> > On Mon, 20 Feb 2023 at 23:04, Thomas Munro <thomas.munro@gmail.com> wrote:
> > > Done like that in this version.  This is the version I'm thinking of
> > > committing, unless someone wants to argue for another level.
> >
> > FWIW the cfbot doesn't understand this patch series. I'm not sure why
> > but it's only trying to apply the first (the MacOS one) and it's
> > failing to apply even that.
>
> Ah, it's because I committed one patch in the series.  I'll commit one
> more, and then repost the rest, shortly.

I pushed the main patch, "Don't leak descriptors into subprograms.".
Here's a rebase of the POSIX-next stuff, but I'll sit on these for a
bit longer to see if the build farm agrees with my claim about the
ubiquity of O_CLOEXEC, and if anyone has comments on this stuff.

Commits

  1. libpq: Use modern socket flags, if available.

  2. Don't leak descriptors into subprograms.

  3. Remove obsolete coding for early macOS.

  4. Adjust commit 2dbe8905 for ancient macOS.