]> sourceware.org Git - newlib-cygwin.git/commitdiff
Cygwin: path_conv::check: handle error from fhandler_process::exists
authorKen Brown <kbrown@cornell.edu>
Tue, 8 Sep 2020 16:23:32 +0000 (12:23 -0400)
committerKen Brown <kbrown@cornell.edu>
Tue, 8 Sep 2020 19:00:55 +0000 (15:00 -0400)
fhandler_process::exists is called when we are checking a path
starting with "/proc/<pid>/fd".  If it returns virt_none and sets an
errno, there is no need for further checking.  Just set 'error' and
return.

winsup/cygwin/path.cc

index 95faf8ca724cdb946781da3623276282586c9cbb..1d0c38a20bb9635e9596aa3a16c326759c48436b 100644 (file)
@@ -809,6 +809,15 @@ path_conv::check (const char *src, unsigned opt,
                          delete fh;
                          goto retry_fs_via_processfd;
                        }
+                     else if (file_type == virt_none && dev == FH_PROCESSFD)
+                       {
+                         error = get_errno ();
+                         if (error)
+                           {
+                             delete fh;
+                             return;
+                           }
+                       }
                      delete fh;
                    }
                  switch (file_type)
This page took 0.034703 seconds and 5 git commands to generate.