Cygwin: open: support Linux-specific O_PATH flag

Signed-off-by: Corinna Vinschen <corinna@vinschen.de>
This commit is contained in:
Corinna Vinschen
2019-01-07 19:33:11 +01:00
parent 91ca95ae4a
commit b93022a82d
8 changed files with 74 additions and 4 deletions

View File

@@ -32,6 +32,11 @@ ioctl (int fd, int cmd, ...)
debug_printf ("ioctl(fd %d, cmd %y)", fd, cmd);
int res;
if (cfd->get_flags () & O_PATH)
{
set_errno (EBADF);
return -1;
}
/* FIXME: This stinks. There are collisions between cmd types
depending on whether fd is associated with a pty master or not.
Something to fix for Cygwin2. CGF 2006-06-04 */