diff options
author | Corinna Vinschen <corinna@vinschen.de> | 2014-08-18 15:09:56 +0400 |
---|---|---|
committer | Corinna Vinschen <corinna@vinschen.de> | 2014-08-18 15:09:56 +0400 |
commit | 1091d4404ed9f4b20a0f45be20a9f8187d5db335 (patch) | |
tree | 3d6e9cad7ae9f250509bf0529149090b0fbb556d /winsup/cygwin/dtable.cc | |
parent | 7e46c0af626b5ac2fdd8051e8357ba461d3fdabf (diff) |
* dtable.cc (dtable::init_std_file_from_handle): Mention that console
handles are kernel objects since Windows 8.
* fhandler.h (enum conn_state): Add "listener" state.
(class fhandler_socket): Drop listener status flag.
(fhandler_socket::lseek): Return -1 and errno ESPIPE.
(fhandler_serial::lseek): Ditto.
* fhandler_socket.cc (fhandler_socket::listen): Set connect_state to
listener. Add comment.
(fhandler_socket::accept4): Explicitely check if the socket is listening
and fail with EINVAL, if not. Explain why we have to do that.
(fhandler_socket::recv_internal): Explicitely check if the socket is
connected if it's a stream socket. Explain why we have to do that.
(fhandler_socket::getpeereid): Drop now redundant test.
Diffstat (limited to 'winsup/cygwin/dtable.cc')
-rw-r--r-- | winsup/cygwin/dtable.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/winsup/cygwin/dtable.cc b/winsup/cygwin/dtable.cc index 0dc548c3d..17ed51f9a 100644 --- a/winsup/cygwin/dtable.cc +++ b/winsup/cygwin/dtable.cc @@ -371,9 +371,10 @@ dtable::init_std_file_from_handle (int fd, HANDLE handle) FILE_ACCESS_INFORMATION fai; int openflags = O_BINARY; - /* Console windows are not kernel objects, so the access mask returned - by NtQueryInformationFile is meaningless. CMD always hands down - stdin handles as R/O handles, but our tty slave sides are R/W. */ + /* Console windows are no kernel objects up to Windows 7/2008R2, so the + access mask returned by NtQueryInformationFile is meaningless. CMD + always hands down stdin handles as R/O handles, but our tty slave + sides are R/W. */ if (fh->is_tty ()) { openflags |= O_RDWR; |