<div dir="ltr">On Thu, Oct 24, 2013 at 9:15 PM, Ross Finlayson <span dir="ltr"><<a href="mailto:finlayson@live555.com" target="_blank">finlayson@live555.com</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div style="word-wrap:break-word"><div><div class="im"><blockquote type="cite">
<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>Thanks for the clarifications, I've looked further and found that send() is returning -1, with errno being set to EPIPE. The problem is in "select" in BasicTaskScheduler::SingleStep still indicating a writable socket even when it is disconnected. Is this a libc problem?<br>
</div></div></div></div></blockquote></div></div><div class="im"><div><br></div></div>If "select()" is reporting that a socket is writable, when it's not, then that would appear to be a bug...<div class="im">
<br><br></div></div></blockquote><div> I've found a reference on what would be the proper behavior, In <span style="margin:0px;padding:0px;border:0px;vertical-align:baseline;color:rgb(0,0,0);font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:18px">Unix Network Programming, Volume 1: The Sockets Networking API (3rd Edition), it is noted that a socket will be ready for writing if the write half of the connection is closed, but a write will generate a SIGPIPE. So a check on EPIPE in the send call will be needed.</span></div>
<div><span style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;color:rgb(0,0,0);font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:18px"><br></span></div><div>
<span style="margin:0px;padding:0px;border:0px;font-size:14px;vertical-align:baseline;color:rgb(0,0,0);font-family:Arial,'Liberation Sans','DejaVu Sans',sans-serif;line-height:18px">Park.</span></div></div>
</div></div>