Date: Thu, 23 Sep 1999 09:40:44 +0800 (WST) From: Michael Kennett <mike@laurasia.com.au> To: freebsd-questions@freebsd.org Subject: Poll() syscall with sockets Message-ID: <199909230140.JAA06903@laurasia.com.au>
next in thread | raw e-mail | index | archive | help
Hello, I have a question about the behaviour of the poll() system call with sockets. I'd like to detect when the remote end of the connection has been dropped, and I was thinking that the poll() call would return the event POLLHUP when the socket is closed. However, this doesn't seem to be the case! Currently, I'm detecting the closure of the socket by detecting the POLLRDNORM event, and reading 0 bytes, which seems to be a bit of a work- around. Is this an accepted way of detecting closure of a socket? Thanks in advance, Mike Kennett To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199909230140.JAA06903>