Subj : Re: close while read-ing To : comp.programming.threads From : Sergei Organov Date : Fri May 27 2005 03:30 pm "David Schwartz" writes: > "Sergei Organov" wrote in message > news:d740lu$64t$2@n6.co.ru... > > "David Schwartz" writes: > >> For a TCP socket, you can unblock and terminate the connection by > >> calling "shutdown". > > > > I've been looking for a piece of documentation where this behavior is > > specified, but failed. Could you please give a reference? > > This is the most you'll find that's official: > http://www.opengroup.org/onlinepubs/009695399/functions/shutdown.html 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()? -- Sergei. .