Cygwin: honor the O_PATH flag when opening a FIFO
Previously fhandler_fifo::open would treat the FIFO as a reader and would block, waiting for a writer.
This commit is contained in:
parent
d07d375bc4
commit
c2b392c600
|
@ -451,11 +451,18 @@ fhandler_fifo::open (int flags, mode_t)
|
|||
error_set_errno
|
||||
} res;
|
||||
|
||||
if (flags & O_PATH)
|
||||
{
|
||||
query_open (query_read_attributes);
|
||||
nohandle (true);
|
||||
}
|
||||
|
||||
/* Determine what we're doing with this fhandler: reading, writing, both */
|
||||
switch (flags & O_ACCMODE)
|
||||
{
|
||||
case O_RDONLY:
|
||||
reader = true;
|
||||
if (!query_open ())
|
||||
reader = true;
|
||||
break;
|
||||
case O_WRONLY:
|
||||
writer = true;
|
||||
|
@ -577,6 +584,8 @@ fhandler_fifo::open (int flags, mode_t)
|
|||
}
|
||||
}
|
||||
}
|
||||
if (query_open ())
|
||||
res = success;
|
||||
out:
|
||||
if (res == error_set_errno)
|
||||
__seterrno ();
|
||||
|
|
Loading…
Reference in New Issue