Re: [PATCH] O_CLOEXEC not honored on Windows - handle inheritance chain
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Bryan Green <dbryan.green@gmail.com>
Cc: Thomas Munro <thomas.munro@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2025-12-13T06:33:15Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
ci: Test Windows + Mkvcbuild.pm in REL_16_STABLE.
- 4b9ce1ef609b 16.12 landed
-
Fix Mkvcbuild.pm builds of test_cloexec.c.
- 4da5c33a3a04 18.2 landed
- 45d92b76dc4a 19 (unreleased) landed
- 80e8ec772bff 16.12 landed
- b3c8119e28c0 17.8 landed
-
Clean up test_cloexec.c and Makefile.
- 0666ccc16cc2 16.12 landed
- 0451859131e5 17.8 landed
- a7d06e74d512 18.2 landed
- bec2a0aa3065 19 (unreleased) landed
-
Fix O_CLOEXEC flag handling in Windows port.
- d62a258cd45a 16.12 landed
- f24af0e04cef 17.8 landed
- bebb281b08b6 18.2 landed
- c507ba55f5bf 19 (unreleased) landed
-
Don't leak descriptors into subprograms.
- 1da569ca1f1f 16.0 cited
Bryan Green <dbryan.green@gmail.com> writes: > I removed the useless snprintf() call that was using GetCommandLine(). > That was left in place when I moved to GetModuleFileName(). Also, > removed the unused 'space_pos' variable and the unneeded scope block. All good to my eye. > I decided to just use 1024 for the exe_path size since that is what > cmdline is set to use. Personally I'd have gone the other way, say char exe_path[MAXPGPATH]; char cmdline[MAXPGPATH + 100]; > I also removed some self-evident comments that > were leftover from my practice of writing comments and then coding. I think you went way overboard on removing "self-evident" comments. Signposts as to what the code intends to do are pretty helpful IMO. They do have to be accurate though, for instance this previous comment: - * Find the actual executable path by removing any arguments from - * GetCommandLine(). didn't seem to convey what the code was doing (which I neglected to complain about before). BTW, pgindent will undo some of the whitespace changes you made here. regards, tom lane