mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-21 08:17:29 +08:00
So far io_handle is NULL when calling fhandler_base::open to open or create a file. Add a check for io_handle to allow priming the fhandler with a HANDLE value so we can reopen a file from a HANDLE on file systems supporting it. This allows to open already deleted files for further action. This will be used by open("/proc/PID/fd/DESCRIPTOR") scenarios. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
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