public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: path_conv::check: handle error from fhandler_process::exists
@ 2020-09-08 19:17 Ken Brown
0 siblings, 0 replies; only message in thread
From: Ken Brown @ 2020-09-08 19:17 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=6775ac8cb5adf6c945c5d09d957f21d2ca673aba
commit 6775ac8cb5adf6c945c5d09d957f21d2ca673aba
Author: Ken Brown <kbrown@cornell.edu>
Date: Tue Sep 8 12:23:32 2020 -0400
Cygwin: path_conv::check: handle error from fhandler_process::exists
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.
Diff:
---
winsup/cygwin/path.cc | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc
index 95faf8ca7..1d0c38a20 100644
--- a/winsup/cygwin/path.cc
+++ b/winsup/cygwin/path.cc
@@ -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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-09-08 19:17 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-08 19:17 [newlib-cygwin] Cygwin: path_conv::check: handle error from fhandler_process::exists Ken Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).