From 04843bf4a05314c57cf2036917a0e52d95b79ade Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Mon, 18 Apr 2005 18:56:52 +0000 Subject: * fhandler.h (enum conn_state): Add connect_failed state. * fhandler_socket.cc (fhandler_socket::connect): Set connect_state to connect_failed when connect failed. * poll.cc (poll): Change errno to EINVAL if allocating memory fails, according to SUSv3. Add socket descriptors always to except_fds. Test for failed connect and set revents flags appropriately. * select.cc (set_bits): Set connect_state to connect_failed when select indicates failed nonblocking connect. (fhandler_dev_null::select_except): Set except_ready to false so that /dev/null is not always in except state. (peek_socket): Fix bogus conditional. (fhandler_socket::select_write): Treat all connect_states except unconnected equivalent to return consistent results. (fhandler_windows::select_except): Set except_ready to false so that /dev/windows is not always in except state. --- winsup/cygwin/fhandler.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/fhandler.h') diff --git a/winsup/cygwin/fhandler.h b/winsup/cygwin/fhandler.h index a7fcb9086..7611378bd 100644 --- a/winsup/cygwin/fhandler.h +++ b/winsup/cygwin/fhandler.h @@ -50,7 +50,8 @@ enum conn_state { unconnected = 0, connect_pending = 1, - connected = 2 + connected = 2, + connect_failed = 3 }; enum line_edit_status -- cgit v1.2.3