--- linux.old/net/ipv4/tcp.c Fri Jul 6 13:50:00 2001 +++ linux/net/ipv4/tcp.c Thu Aug 23 11:29:15 2001 @@ -415,11 +415,8 @@ * then we could set it on SND_SHUTDOWN. BTW examples given * in Stevens' books assume exactly this behaviour, it explains * why PULLHUP is incompatible with POLLOUT. --ANK - * - * NOTE. Check for TCP_CLOSE is added. The goal is to prevent - * blocking on fresh not-connected or disconnected socket. --ANK */ - if (sk->shutdown == SHUTDOWN_MASK || sk->state == TCP_CLOSE) + if (sk->shutdown == SHUTDOWN_MASK) mask |= POLLHUP; if (sk->shutdown & RCV_SHUTDOWN) mask |= POLLIN | POLLRDNORM; --- linux.old/net/unix/af_unix.c Tue Jul 24 21:32:01 2001 +++ linux/net/unix/af_unix.c Thu Aug 23 11:31:58 2001 @@ -1711,8 +1711,8 @@ if (!skb_queue_empty(&sk->receive_queue) || (sk->shutdown&RCV_SHUTDOWN)) mask |= POLLIN | POLLRDNORM; - /* Connection-based need to check for termination and startup */ - if (sk->type == SOCK_STREAM && sk->state==TCP_CLOSE) + /* Connection-based need to check for termination */ + if (sk->type == SOCK_STREAM) mask |= POLLHUP; /*