mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-02 20:40:24 +08:00
82d38aa51a
Treat a special file opened with O_PATH the same as a regular file, i.e., use its handle to get the stat information. Before this change, fstat_fs opened the file a second time, with the wrong flags and without closing the existing handle. A side effect was to change the openflags of the file, possibly causing further system calls to fail. Currently this change only affects FIFOs, but it will affect AF_LOCAL/AF_UNIX sockets too once they support O_PATH.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. Cygwin documentation is available on the net at https://cygwin.com You might especially be interested in https://cygwin.com/faq/faq.html#faq.programming.building-cygwin