DMARC-Filter: OpenDMARC Filter v1.4.2 delorie.com 53EBoWIC989449 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 53EBoWIC989449 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=F96eCvjv X-Recipient: archive-cygwin AT delorie DOT com DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org DC5BE385840D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cygwin.com; s=default; t=1744631430; bh=iT7vD3d4XtXPp+a1Glqprt/rvQcGlxKWTl0T/K7f1ls=; h=Date:To:Subject:In-Reply-To:References:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=F96eCvjvsRVRpbmuFtk+VPsJEp0LNyhXb430TuonULJjrdn/P0i8qzoSdpd2awoCy daBpC+Kvg7Puu4PvGIJve1x/syJ2XJvrWMAE1jCkCPn5LKkkB+Us+5WRQvFxMtedOv 6OEvDa0VYh6uSka7Pu7fMFVNgtLepyRiFKzArpYs= X-Original-To: cygwin AT cygwin DOT com Delivered-To: cygwin AT cygwin DOT com DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org C8A683858C54 ARC-Filter: OpenARC Filter v1.0.0 sourceware.org C8A683858C54 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1744631405; cv=none; b=Q1PPB1iiixU9MzUseHjoUWSh65EXqFX/gS23tTzPYhXB9vYTinXrYIxO5YuvI47xIg2Hn6WUlpjvuVJkh47+GE48h1/APaD9v34Uy8H4YAWed4i7fwYestg40TUo7R5RPERQPjvrgbQv3bxrZfJvgtHQ0ejwtppjiv/OzmhmQmM= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1744631405; c=relaxed/simple; bh=W1i8BuaAELGmA/aRe09XxcARcE2iUno4fo5nu139sMM=; h=DKIM-Signature:Date:From:Message-ID:To:Subject:MIME-Version; b=td9OFIaO/IWb/q51VKDSWfvb8S5nO4gTKfgw/tPbV98So69e+RXKVyU8beWwlMQOmsq/8pPB0czH44NRXm+CvEmLWL/P3a96Z2SddubXhejpnO6imbRwzXTNG6aN7w0YahpjUlsUydFYSLTJDizl4eBLggtfCiWXe0RIt49Maao= ARC-Authentication-Results: i=1; server2.sourceware.org DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C8A683858C54 X-Yandex-Fwd: 1 Date: Mon, 14 Apr 2025 14:35:53 +0300 X-Mailer: The Bat! (v9.3.4) Professional Message-ID: <178356831.20250414143553@yandex.ru> To: Bruno Haible , cygwin AT cygwin DOT com Subject: Re: /dev/null regression in Cygwin 3.6.1 In-Reply-To: <10514352.ICPdZLu4VQ@nimes> References: <10514352 DOT ICPdZLu4VQ AT nimes> 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: Andrey Repin via Cygwin Reply-To: cygwin AT cygwin DOT com Cc: Andrey Repin 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" Greetings, Bruno Haible! > In Gnulib, we have a unit test that compiles the program below as a > native Windows program (either with mingw or with MSVC), that exercises > the Gnulib select() function > > > Then it does (in a Cygwin shell): > rm -f t-select-in.tmp > ./test-select-fd.exe r 0 t-select-in.tmp < /dev/null > cat t-select-in.tmp > Up to Cygwin 3.6.0, the contents of the file t-select-in.tmp was "1", > like on most other OSes, indicating that the program can read() from > file descriptor 0. But "< /dev/null" literally means "don't read from STDIN". As far as I recall (correct me if I'm wrong), READING from /dev/null is undefined and may result in undetermined behavior. > In Cygwin 3.6.1, the contents of the file t-select-in.tmp is "0", > indicating that read()ing from file descriptor 0 would block. > This is a regression. What I've gathered is that in most cases reading from /dev/null should immediately return EOF. -- With best regards, Andrey Repin Monday, April 14, 2025 14:31:08 Sorry for my terrible english... -- 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