[ANNOUNCEMENT] Cygwin 3.0.0-1

Brian Inglis Brian.Inglis@SystematicSw.ab.ca
Mon Feb 18 05:18:00 GMT 2019


On 2019-02-17 09:42, Corinna Vinschen wrote:
> On Feb 17 18:28, Andrey Repin wrote:
>>> I uploaded a new Cygwin release 3.0.0-1.
>> The redirection issue I mentioned for 3.0-0.9 is still happens.
>> And I see the STC did not made it to the list.
>> Hamsters were hungry, I guess... Let's try without attachments.
>> TYPE "%SystemRoot%\win.ini" | diff -u "%SystemRoot%\win.ini" -
> I'm baffled.  diff calls fstat on descriptor 0.  fstat returns
> with st_mode set to S_IFIFO | S_IRUSR, so it *knows* descriptor
> 0 is a pipe and thus not seekable.  Nevertheless it calls lseek
> just a bit later to seek back to the beginning of input.

Does not happen under mintty, only cmd, does the below help?

 > ver

Microsoft Windows [Version 10.0.17763.292]

 > uname -srvmo
CYGWIN_NT-10.0 3.0.0(0.336/5/3) 2019-02-16 13:21 x86_64 Cygwin

 > diff --version
diff (GNU diffutils) 3.5
Packaged by Cygwin (3.5-2)
Copyright (C) 2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

Written by Paul Eggert, Mike Haertel, David Hayes,
Richard Stallman, and Len Tower.

 > cat /var/log/setup.log | strace -o diff.strace diff -u /var/log/setup.log -
diff: -: Illegal seek
cat: write error: No space left on device

 > less diff.strace
...
   41   63902 [main] diff 43744 _cygwin_istext_for_stdio: fd 3: opened as binary
  359   64261 [main] diff 43744 setmode_helper: improbable, but 0 != 3
  347   64608 [main] diff 43744 setmode_helper: improbable, but 1 != 3
  349   64957 [main] diff 43744 setmode_helper: improbable, but 2 != 3
   47   65004 [main] diff 43744 read: read(3, 0x600063390, 65536) blocking
   93   65097 [main] diff 43744 fhandler_base::read: returning 65536, binary mode
   43   65140 [main] diff 43744 read: 65536 = read(3, 0x600063390, 65536)
   90   65230 [main] diff 43744 fhandler_base::set_flags: flags 0x10000,
supplied_bin 0x0
   39   65269 [main] diff 43744 fhandler_base::set_flags: O_TEXT/O_BINARY set in
flags 0x10000
   38   65307 [main] diff 43744 fhandler_base::set_flags: filemode set to binary
   38   65345 [main] diff 43744 _setmode: (0<>, 0x10000) returning text
   39   65384 [main] diff 43744 _cygwin_istext_for_stdio: fd 0: opened as binary
  162   65546 [main] diff 43744 setmode_helper: file was binary now binary
  286   65832 [main] diff 43744 setmode_helper: improbable, but 1 != 0
  287   66119 [main] diff 43744 setmode_helper: improbable, but 2 != 0
^^^
*No strace of _fwalk calling setmode_helper for comparison with 0, and continues
to compare against 1 and 2? Should _fwalk return if !fp->flags?*

   39   66158 [main] diff 43744 read: read(0, 0x600073490, 65536) blocking
  109   66267 [main] diff 43744 fhandler_base::read: returning 65536, binary mode
   47   66314 [main] diff 43744 read: 65536 = read(0, 0x600073490, 65536)
   43   66357 [main] diff 43744 fhandler_pipe::lseek: (-65536, 1)
   40   66397 [main] diff 43744 __set_errno: virtual off_t
fhandler_pipe::lseek(off_t, int):165 setting errno 29
   39   66436 [main] diff 43744 lseek64: -1 = lseek(0, -65536, 1), errno 29
...

-- 
Take care. Thanks, Brian Inglis, Calgary, Alberta, Canada

This email may be disturbing to some readers as it contains
too much technical detail. Reader discretion is advised.

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list