Subj : Re: close while read-ing To : comp.programming.threads From : David Schwartz Date : Fri May 27 2005 01:12 pm "Sergei Organov" wrote in message news:d76srm$k9q$1@n6.co.ru... > Thanks, David, I'm aware of this man page. But unfortunately it says > nothing about unblocking of thread(s) being blocked in read(), write(), > etc. In particular, it says: "The shutdown() function disables > *subsequent* send and/or receive operations on a socket" but doesn't > specify what happens to currently active send/receive blocking calls. > > I did try to look for the info in other man pages, such as recv() and > send(), as well to no avail. Do you have any reference that does specify > that waiting thread(s) are unblocked by the shutdown()? You are thinking about this in an odd way. It's not that the threads are unblocked, it's that the operation now returns with an error because the connection is shutdown. What must happen if the connection shuts down while a read or write is blocking? DS .