I'm having a simular problem, but somehow can't recreate it.
The difference is that I set the sockets to non-blocking, and
expect it to return some error.
read() returns 0, with errno set to 0, if the socket is still
open it returns -1 with errno set 11 (EAGAIN). I can understand
those behaviours.
What I'm seeing however in an other program is that select says I
can read from the socket, and that read returns 0, with errno set
to EGAIN. I call select() again, with returns and says I can read
from that socket ..., which keeps going on. It stops from the
moment there is any i/o on an other socket.
Is there any way you can detect the other side is gone without
using write()? write() shoud return an EPIPE. Should I be able
to detect it with read(), or some oter system call?
Kurt
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/