* dtable.cc (dtable::init_std_file_from_handle): Set access mask for
the slave side of ttys explicitely. Explain why.
This commit is contained in:
parent
27f1db48c7
commit
179bee57db
@ -1,3 +1,8 @@
|
|||||||
|
2010-04-21 Corinna Vinschen <corinna@vinschen.de>
|
||||||
|
|
||||||
|
* dtable.cc (dtable::init_std_file_from_handle): Set access mask for
|
||||||
|
the slave side of ttys explicitely. Explain why.
|
||||||
|
|
||||||
2010-04-20 Christopher Faylor <me+cygwin@cgf.cx>
|
2010-04-20 Christopher Faylor <me+cygwin@cgf.cx>
|
||||||
|
|
||||||
* path.cc (cygwin_create_path): Free memory on error.
|
* path.cc (cygwin_create_path): Free memory on error.
|
||||||
|
@ -363,8 +363,9 @@ dtable::init_std_file_from_handle (int fd, HANDLE handle)
|
|||||||
FILE_ACCESS_INFORMATION fai;
|
FILE_ACCESS_INFORMATION fai;
|
||||||
|
|
||||||
/* Console windows are not kernel objects, so the access mask returned
|
/* Console windows are not kernel objects, so the access mask returned
|
||||||
by NtQueryInformationFile is meaningless. */
|
by NtQueryInformationFile is meaningless. CMD always hands down
|
||||||
if (dev == FH_TTY || dev == FH_CONSOLE)
|
stdin handles as R/O handles, but our tty slave sides are R/W. */
|
||||||
|
if (dev == FH_TTY || dev == FH_CONSOLE || dev.major == DEV_TTYS_MAJOR)
|
||||||
access |= GENERIC_READ | GENERIC_WRITE;
|
access |= GENERIC_READ | GENERIC_WRITE;
|
||||||
else if (NT_SUCCESS (NtQueryInformationFile (handle, &io, &fai,
|
else if (NT_SUCCESS (NtQueryInformationFile (handle, &io, &fai,
|
||||||
sizeof fai,
|
sizeof fai,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user