<div dir="ltr">Hi Merijn,<div><br></div><div>I see how you'd wait for exceptional conditions using select(). Epoll is a bit different... How would you do it with epoll? Is it using the EPOLLPRI event type? </div><div><br>
</div><div>Andi</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Mar 16, 2014 at 1:16 PM, 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:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">I just went with the common documentation name, I know this includes out-of-band data, etc. If it makes you happier, feel free to consider this proposal with s/Error/Exceptional, regardless of how it's called, it'd be nice if we could use this from within Haskell.<div>
<br></div><div>Cheers,</div><div>Merijn<div><div class="h5"><br><div><br><div><div>On Mar 16, 2014, at 16:09 , Brandon Allbery wrote:</div><br><blockquote type="cite"><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" target="_blank">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" target="_blank">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>
</blockquote></div><br></div></div></div></div></div><br>_______________________________________________<br>
Libraries mailing list<br>
<a href="mailto:Libraries@haskell.org">Libraries@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/libraries" target="_blank">http://www.haskell.org/mailman/listinfo/libraries</a><br>
<br></blockquote></div><br></div>