The data that causes select to return is the EOF because the other side has closed the connection. This causes read to return zero. For more information see ``2.1 How can I tell when a socket is closed on the other end?''[an error occurred while processing this directive]