Re: issue with meson builds on msys2 - Mailing list pgsql-hackers

From Andres Freund
Subject Re: issue with meson builds on msys2
Date
Msg-id 20230515234356.7ysq7w6jjsofeunt@awork3.anarazel.de
Whole thread Raw
In response to Re: issue with meson builds on msys2  (Andres Freund <andres@anarazel.de>)
Responses Re: issue with meson builds on msys2
List pgsql-hackers
Hi,

On 2023-05-15 15:30:28 -0700, Andres Freund wrote:
> As soon as either the pg_ctl for the start, or the whole bash invocation, has
> stdin redirected, the problem vanishes.

For a moment I thought this could be related to InheritStdHandles() - but no,
it doesn't make a difference.

There's loads of handles referencing cygwin alive in pg_ctl.

Based on difference in strace output for bash -c "pg_ctl stop" for the case
where start redirected stdin (#1) and where not (#2), it looks like some part
of msys / cygwin sees that stdin is alive when preparing to execute "pg_ctl
stop", and then runs into trouble.

The way we start the child process on windows makes the use of cmd.exe for
redirection pretty odd.


I couldn't trivially reproduce this with a much simpler case (just nohup
sleep). Perhaps it's dependent on a wrapper cmd or such.


Greetings,

Andres Freund



pgsql-hackers by date:

Previous
From: Peter Smith
Date:
Subject: Re: [DOC] Update ALTER SUBSCRIPTION documentation v2
Next
From: Michael Paquier
Date:
Subject: Re: Using make_ctags leaves tags files in git