aboutsummaryrefslogtreecommitdiff
path: root/winsup
diff options
context:
space:
mode:
authorKen Brown <kbrown@cornell.edu>2020-01-23 16:31:04 +0000
committerCorinna Vinschen <corinna@vinschen.de>2020-01-24 11:24:18 +0100
commit5fb3790422495ba55390bbac32b60bcea908ef70 (patch)
tree8adc9a21a280fbfc6db5da99171138f5094da2b6 /winsup
parentd880e97ec95ac3b15be972a99da2a5e97ef63ee6 (diff)
downloadnewlib-5fb3790422495ba55390bbac32b60bcea908ef70.zip
newlib-5fb3790422495ba55390bbac32b60bcea908ef70.tar.gz
newlib-5fb3790422495ba55390bbac32b60bcea908ef70.tar.bz2
Cygwin: re-implement fhandler_fifo::open with O_PATH
If the O_PATH flag is set, fhandler_fifo::open now simply calls fhandler_base::open_fs. The previous attempt to handle O_PATH in commit aa55d22c, "Cygwin: honor the O_PATH flag when opening a FIFO", fixed a hang but otherwise didn't do anything useful.
Diffstat (limited to 'winsup')
-rw-r--r--winsup/cygwin/fhandler_fifo.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/winsup/cygwin/fhandler_fifo.cc b/winsup/cygwin/fhandler_fifo.cc
index fd82230..8cbab35 100644
--- a/winsup/cygwin/fhandler_fifo.cc
+++ b/winsup/cygwin/fhandler_fifo.cc
@@ -453,17 +453,13 @@ fhandler_fifo::open (int flags, mode_t)
} res;
if (flags & O_PATH)
- {
- query_open (query_read_attributes);
- nohandle (true);
- }
+ return open_fs (flags);
/* Determine what we're doing with this fhandler: reading, writing, both */
switch (flags & O_ACCMODE)
{
case O_RDONLY:
- if (!query_open ())
- reader = true;
+ reader = true;
break;
case O_WRONLY:
writer = true;
@@ -585,8 +581,6 @@ fhandler_fifo::open (int flags, mode_t)
}
}
}
- if (query_open ())
- res = success;
out:
if (res == error_set_errno)
__seterrno ();