Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pyhsM-0005av-TN for pgsql-hackers@arkaria.postgresql.org; Mon, 15 May 2023 23:45:11 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1pyhrM-0001WY-MK for pgsql-hackers@arkaria.postgresql.org; Mon, 15 May 2023 23:44:08 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1pyhrK-0001VB-WB for pgsql-hackers@lists.postgresql.org; Mon, 15 May 2023 23:44:08 +0000 Received: from wout5-smtp.messagingengine.com ([64.147.123.21]) by magus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pyhrG-0001X3-2D for pgsql-hackers@lists.postgresql.org; Mon, 15 May 2023 23:44:06 +0000 Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 600F832009DA; Mon, 15 May 2023 19:43:58 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 15 May 2023 19:43:58 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:cc:content-type:content-type:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm1; t=1684194237; x=1684280637; bh=yB AGf14r253tiZFon18CAUng5pGYWgdOdEO8yYR/I8U=; b=tkfZUVCDwGOri9nBLr Rjz8FLQ+sjhrV3FadOp4PZ6FQIdB6KMUVWkzEbKyeINn4pVDsL+XnQsc9rzrjRpr KccXSbl9dMDiFeQkDHGtfwmIvZRJxgZEm4W1yOTo0UhrlYm20N2IfJGIGTWYIM+G LRmv8gzqarASr/GMiDTI8psWmLRomkAEDKBaRKMM9daclCgPeue7XppXV3qWxO/9 /SQ9R3PdzcPHg5qZqgAKiAUQiqAb3Gw44aXReABFGI/RMsRsNhuajNVDiL5Y3uLk CvNRIUcQifrteH5J/cxxNU7GX4yp495+ULnRoZwhVnyQYT43NjDXlXUDLX2XNK0v iH6g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:content-type:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1684194237; x=1684280637; bh=yBAGf14r253ti ZFon18CAUng5pGYWgdOdEO8yYR/I8U=; b=pyYejJnwqSnUv2Z5V+kCEY+zfklnG ijwA5uQM4oPnR0qj+ua7wAA4f2hFT7/gc2VB83xogDcAcwULwPET9X3d9HJPd18A p+QvjWw7dgj0uiyLiAdFi5/NGY3zmaKAh/WhdH/XW9FCwQmpgsq5TwFLu7RR9m/i XQBZbMEFyQBSICCWs9uRvLveb1zBAxHMJqN+bk6P64L0jGNEWKSLR2AkLweqY57m /UdgUZwel2Ng1FTaSBwTHKz7KZxO1D3tzLufenq/usdei1BZfnhQCdVS4e53JH1F TSdcgar/e3aiAdGO/PEwbigVNZ+1GbdGPg35m0Bp0v7sRFeJj11l0v7qA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrfeehkedgvdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepfffhvfevuffkfhggtggujgesthdtredttddtvdenucfhrhhomheptehnughr vghsucfhrhgvuhhnugcuoegrnhgurhgvshesrghnrghrrgiivghlrdguvgeqnecuggftrf grthhtvghrnhepvdfffeevhfetveffgeeiteefhfdtvdffjeevhfeuteegleduheetvedu ieettddunecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomh eprghnughrvghssegrnhgrrhgriigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 15 May 2023 19:43:57 -0400 (EDT) Date: Mon, 15 May 2023 16:43:56 -0700 From: Andres Freund To: Andrew Dunstan Cc: Tom Lane , pgsql-hackers@lists.postgresql.org Subject: Re: issue with meson builds on msys2 Message-ID: <20230515234356.7ysq7w6jjsofeunt@awork3.anarazel.de> References: <5bddd941-9819-6655-7a71-3f346050583e@dunslane.net> <6efeb45a-07f9-2291-c8f8-9fb4abbb6ebc@dunslane.net> <20230427221828.2qo7z4xb4f7islln@awork3.anarazel.de> <236c0354-62b1-0ae1-a252-4c866bc1c5d6@dunslane.net> <20230504235413.eibaxlxslo76ipjl@awork3.anarazel.de> <2ff71af4-cdee-37b8-525a-2b25afd1769a@dunslane.net> <20230515193817.ttx4qf3ceqeufls2@awork3.anarazel.de> <26b0ebdb-3e7c-d562-620d-8e2f17286ff9@dunslane.net> <20230515201326.tbjgfdef6ul6oqfd@awork3.anarazel.de> <20230515223028.gkctmcoe7jtd5mmw@awork3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230515223028.gkctmcoe7jtd5mmw@awork3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk 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