diff options
author | Ken Brown <kbrown@cornell.edu> | 2020-09-08 12:23:32 -0400 |
---|---|---|
committer | Ken Brown <kbrown@cornell.edu> | 2020-09-08 15:00:55 -0400 |
commit | 6775ac8cb5adf6c945c5d09d957f21d2ca673aba (patch) | |
tree | 875f1a6b5e6d3458704074541aea6285e6d34201 | |
parent | 58cc67d6536c73c463114a30b4f14f331137baeb (diff) | |
download | cygnal-6775ac8cb5adf6c945c5d09d957f21d2ca673aba.tar.gz cygnal-6775ac8cb5adf6c945c5d09d957f21d2ca673aba.tar.bz2 cygnal-6775ac8cb5adf6c945c5d09d957f21d2ca673aba.zip |
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.
-rw-r--r-- | winsup/cygwin/path.cc | 9 |
1 files changed, 9 insertions, 0 deletions
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) |