Hi!

On Thu, Dec 13, 2007 at 11:10:51AM +0000, Stuart Henderson wrote:
>On 2007/12/13 09:09, Otto Moerbeek wrote:
>> It's depening on the application if sockets staying in CLOSE_WAIT are
>> a problem or not: it might be intentional (in the hulp duplex case),
>> or it might be a program "forgetting" to do a close.

>Does select() notify the application of FIN from the other side?

I haven't followed the rest of the thread, so answering this question
out of context: Yes, FIN from the other side says that there'll be no
other data from the other side, i.e. that'll lead to an EOF condition on
the data stream. So after the application has read all the remaining
data from the socket, the socket will be readable (in the sense of the
read bit from select(), or POLLIN from poll(), or EVFILT_READ for
kqueue/kevent) and if you read, it'll return 0, just the same as if you
have EOF on files.

>[...]

Kind regards,

Hannah.

Reply via email to