pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Bryan Green <dbryan.green@gmail.com>
To: Thomas Munro <thomas.munro@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: [PATCH] O_CLOEXEC not honored on Windows - handle inheritance chain
Date: Fri, 12 Dec 2025 22:10:45 -0600
Message-ID: <45ced00e-e6d1-487b-982d-1720418233b8@gmail.com> (raw)
In-Reply-To: <CA+hUKGJOVyea=EqZaMy9nt0Js10+E9y1FYL0=E_+UskZi-3wXQ@mail.gmail.com>
References: <e2b16375-7430-4053-bda3-5d2194ff1880@gmail.com>
	<CA+hUKGJS=xdaQ6iCTSgvBrf8Cm+a_ZMmDjZYhdQX_srHkhOuqA@mail.gmail.com>
	<7f6779d5-7a0e-44c5-a85f-b4ef265db766@gmail.com>
	<35f9236e-95d8-4f31-ac6b-ec54b7de4bac@gmail.com>
	<7412f694-7c57-41e5-ae37-71136070b0da@gmail.com>
	<CA+hUKGLX7t_PZjcUGm2-hL52RsKwof4F+-ENN5qc0AOBMPY1_g@mail.gmail.com>
	<ac7fe47b-0079-4711-9c58-73467b1d262a@gmail.com>
	<e3b982d0-c56e-441e-a5d5-61de571e313c@gmail.com>
	<CA+hUKGJh0a_6EP8NLh6jjQjzzg=Nm_h9HMC19-tBww7ZqQDWVg@mail.gmail.com>
	<CA+hUKGKbWCzBPYGKuoTG2_8uCvrKuoHkvpbjxLUYhPDiJHapNg@mail.gmail.com>
	<1086088.1765593851@sss.pgh.pa.us>
	<CA+hUKGJOVyea=EqZaMy9nt0Js10+E9y1FYL0=E_+UskZi-3wXQ@mail.gmail.com>

On 12/12/2025 9:57 PM, Thomas Munro wrote:
> On Sat, Dec 13, 2025 at 3:44 PM Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Thomas Munro <thomas.munro@gmail.com> writes:
>>> Hearing nothing, pushed.
>>
>> fairywren is unimpressed:
>>
>> ../pgsql/src/test/modules/test_cloexec/test_cloexec.c: In function 'run_parent_tests':
>> ../pgsql/src/test/modules/test_cloexec/test_cloexec.c:137:29: warning: unused variable 'space_pos' [-Wunused-variable]
>>   137 |                 char       *space_pos;
>>       |                             ^~~~~~~~~
> 
> The CI MinGW task also shows this warning, but it doesn't use -Werror.
> The separate CompileWarnings task does, being its purpose, and it
> includes a MinGW cross-build step, but that uses configure, and this
> test is built only by meson.  That wasn't a great idea... we knew we
> were only dealing with Windows but forgot about MinGW, so I'll go and
> write a patch to fix that aspect later today so we're covered for
> warnings.  I'll also think about whether it's worth checking for MinGW
> warnings in both assert and non-assert builds (as we do for regular
> Linux gcc/clang), and I'd also like to try to catch warnings from MSVC
> and had an idea for how to do that...  I might also try to think about
> meson-vs-configure cross checks...
> 
>> What is the point of that first snprintf(cmdline, ...), when its
>> result is guaranteed to be overwritten just below?
>>
>> I'm also dubious about using MAX_PATH here; see the commentary
>> about MAXPGPATH in pg_config_manual.h.  Also, what's the point of
>> using MAX_PATH when the result is going to be transferred into
>> cmdline (with a hardwired size of 1024)?
> 
> Fair points, I'll wait and see if Bryan is free to write a patch on
> Monday (US), and otherwise write one myself.
I will write a patch tonight.  This was my sloppiness from doing
incremental changes and not cleaning up behind myself.  I'll clean it
up.  Thanks for the checks...

-- 
Bryan Green
EDB: https://www.enterprisedb.com





view thread (25+ messages)  latest in thread

Message-ID: <45ced00e-e6d1-487b-982d-1720418233b8@gmail.com>
Permalink:  ../45ced00e-e6d1-487b-982d-1720418233b8@gmail.com/
Also on:    postgresql.org/message-id/45ced00e-e6d1-487b-982d-1720418233b8@gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: dbryan.green@gmail.com, thomas.munro@gmail.com, tgl@sss.pgh.pa.us
  Subject: Re: [PATCH] O_CLOEXEC not honored on Windows - handle inheritance chain
  In-Reply-To: <45ced00e-e6d1-487b-982d-1720418233b8@gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox