<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Sun, Mar 16, 2014 at 10:25 AM, Merijn Verstraaten <span dir="ltr"><<a href="mailto:merijn@inconsistent.nl" target="_blank">merijn@inconsistent.nl</a>></span> wrote:<br>
<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">threadWaitError :: Fd -> IO ()<br>
threadWaitErrorSTM :: Fd -> IO (STM (), IO ())<br>
<br>
to allow for blocking on detecting error condition on file descriptors, similar to what C's select() allows.<br></blockquote></div><div class="gmail_extra"><br></div>If you mean the third bitmask, it is not for errors (notwithstanding the documentation on some systems); an "exceptional condition" is not an error, it's MSG_OOB data. Errors show as "ready" on the appropriate mask (read or write) since a read (resp. write) will return immediately with the error instead of blocking.</div>
<div class="gmail_extra"><br></div><div class="gmail_extra">See <a href="http://stackoverflow.com/questions/1342712/nix-select-and-exceptfds-errorfds-semantics">http://stackoverflow.com/questions/1342712/nix-select-and-exceptfds-errorfds-semantics</a> and <a href="http://man7.org/linux/man-pages/man2/select_tut.2.html">http://man7.org/linux/man-pages/man2/select_tut.2.html</a> for more information.<br clear="all">
<div><br></div>-- <br><div dir="ltr"><div>brandon s allbery kf8nh                               sine nomine associates</div><div><a href="mailto:allbery.b@gmail.com" target="_blank">allbery.b@gmail.com</a>                                  <a href="mailto:ballbery@sinenomine.net" target="_blank">ballbery@sinenomine.net</a></div>
<div>unix, openafs, kerberos, infrastructure, xmonad        <a href="http://sinenomine.net" target="_blank">http://sinenomine.net</a></div></div>
</div></div>