DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 53F8LtFc1384895 Authentication-Results: delorie.com; dmarc=pass (p=none dis=none) header.from=cygwin.com Authentication-Results: delorie.com; spf=pass smtp.mailfrom=cygwin.com DKIM-Filter: OpenDKIM Filter v2.11.0 delorie.com 53F8LtFc1384895 Authentication-Results: delorie.com; dkim=pass (1024-bit key, unprotected) header.d=cygwin.com header.i=@cygwin.com header.a=rsa-sha256 header.s=default header.b=q9pq6Xht X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 1129F385780D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1744705314; bh=L5iCeSBWRlnJihYKZbOxhy8hFTsJQSDe24S5B9rWElc=; h=Date:To:Cc:Subject:In-Reply-To:References:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=q9pq6XhtoYHXFGcJI6K24+36bLg2BwFpL1dy0eGVLegrQf9In3lUIqGADfdGLvJvd 3T45a+YQHv8XyLwdfZWSJo5P3IQL3kRJeVu++p8GbOPGTvWLaa3j/c5kLtiH8aoAyM hpt89cWQ+n4KNiXxSokNEf6n8DE5fsOXx2SAEuJc= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 125DC385841C ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 125DC385841C ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1744705250; cv=none; b=kLlclTieyXWXetnF51NzcbL7kWLa2EdQnA6UJaN2ppl2mVp3WxBBRJbICBIVf7V6ZhTDFXCvk7YEruGcnfmz0XpBFf1IUx5QWEE0bq8QjuEycWFq6ogZVvEBJEZp8bN3mncSHI6IOgFFP6zfSilyu34t5KrrbMpdQPXe7K5gj80= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1744705250; c=relaxed/simple; bh=8ZWYTsgeCgAdBfuKuhY9RCAmuuIwgS/5uGn1C6Bnw2k=; h=Date:From:To:Subject:Message-Id:Mime-Version:DKIM-Signature; b=jMshUW7+49OpYu120riH7axr2+dXHwXOMi5zEv3r16xdgXL+Wjd2mKoY0ZPjbIRme3QdP2SVXrsJbGBEgXBR4swDW2zrr5NiIGrePTQ0TgcLFyn1UXwAdwfouCzf7tUrhc9FXjgHR5r6JJI2FpF9zithpN/3s3HEncfYAfmfV0A= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 125DC385841C Date: Tue, 15 Apr 2025 17:20:46 +0900 To: cygwin AT cygwin DOT com Cc: Bruno Haible Subject: Re: /dev/null regression in Cygwin 3.6.1 Message-Id: <20250415172046.da05eb6b5b161cd8ab79cbb0@nifty.ne.jp> In-Reply-To: <19390375.kOAnuia59f@nimes> References: <10514352 DOT ICPdZLu4VQ AT nimes> <19390375 DOT kOAnuia59f AT nimes> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.30; i686-pc-mingw32) Mime-Version: 1.0 X-BeenThere: cygwin AT cygwin DOT com X-Mailman-Version: 2.1.30 Precedence: list List-Id: General Cygwin discussions and problem reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Takashi Yano via Cygwin Reply-To: Takashi Yano Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: cygwin-bounces~archive-cygwin=delorie DOT com AT cygwin DOT com Sender: "Cygwin" On Mon, 14 Apr 2025 15:03:16 +0200 Bruno Haible wrote: > Here's a smaller reproducer. > > ============================ foo.c ============================ > #include > #include > #include > > int main () > { > HANDLE h = (HANDLE) _get_osfhandle (0); > fprintf (stderr, "h = 0x%08x\n", h); > fprintf (stderr, "FileType is CHAR ? %d\n", GetFileType (h) == FILE_TYPE_CHAR); > int ret = WaitForSingleObject (h, 0); > if (ret == WAIT_OBJECT_0) > fprintf (stderr, "WaitForSingleObject -> WAIT_OBJECT_0\n"); > else if (ret == WAIT_TIMEOUT) > fprintf (stderr, "WaitForSingleObject -> WAIT_TIMEOUT\n"); > else if (ret == WAIT_ABANDONED) > fprintf (stderr, "WaitForSingleObject -> WAIT_ABANDONED\n"); > else if (ret == WAIT_FAILED) > fprintf (stderr, "WaitForSingleObject -> WAIT_FAILED\n"); > } > =============================================================== > Compile this file as a native Windows program (mingw for example). > Then, in a Cygwin shell window, do > $ ./a < /dev/null > > Result in 3.4.6: > > h = 0x000001e8 > FileType is CHAR ? 1 > WaitForSingleObject -> WAIT_OBJECT_0 > > Result in 3.6.1: > > h = 0x00000358 > FileType is CHAR ? 1 > WaitForSingleObject -> WAIT_TIMEOUT > > > Looking through the commits between 3.6.0 and 3.6.1, the most likely culprit > > is commit d750786e7de013b58e2968eeb6a7fd59dcc535c9 . > > Especially since this commit modified select.cc, removing a comment > /* TODO: Buffer really full or non-Cygwin reader? */ > and here we are exactly in that case: a non-Cygwin process reading from > Cygwin's /dev/null. > > Takashi Yano, can you please look at it and restore the previous behaviour? Thanks for the new testcase. I think the issue has been fixed in: cygwin-3.7.0-0.68.g37c49decc835 (Test) Please test. -- Takashi Yano -- Problem reports: https://cygwin.com/problems.html FAQ: https://cygwin.com/faq/ Documentation: https://cygwin.com/docs.html Unsubscribe info: https://cygwin.com/ml/#unsubscribe-simple