RE: [EXTERNAL] Re: /dev/null regression in Cygwin 3.6.1

2025-04-14 Thread Lavrentiev, Anton (NIH/NLM/NCBI) [C] via Cygwin
> (correct me if I'm wrong), READING from /dev/null is > undefined and may result in undetermined behavior. That's an incorrect recollection of facts, unfortunately. Reading from /dev/null should result in an immediate EOF (0 returned from read()). > But "< /dev/null" literally means "don't read

Re: /dev/null regression in Cygwin 3.6.1

2025-04-14 Thread Jeremy Drake via Cygwin
On Mon, 14 Apr 2025, Bruno Haible via Cygwin wrote: > 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. That's Cygwin's select

Re: /dev/null regression in Cygwin 3.6.1

2025-04-14 Thread Bruno Haible via Cygwin
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_CHA

Re: /dev/null regression in Cygwin 3.6.1

2025-04-14 Thread Andrey Repin via 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 > >

Re: /dev/null regression in Cygwin 3.6.1

2025-04-14 Thread Takashi Yano via Cygwin
Hi Bruno, On Sat, 12 Apr 2025 15:21:12 +0200 Bruno Haible wrote: > Hi, > > 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 > >