<div dir="ltr"><div><div><div>Thanks for you answer Diogo, it actually made me think that I could use `sync/timeout' instead of trying to poll directly:<br>(sync/timeout 0 (scheme_fd_to_semaphore s MZFD_CREATE_READ #t))<br>
<br></div>Unfortunately this does not work :)<br></div><div>It always returns #f.<br></div>I tried with MZFD_CHECK_READ instead, but got a segfault.<br><br></div>Probably I should wait for the documentation of `scheme_fd_to_semaphore' then.<br>
<br>Laurent<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Apr 21, 2013 at 9:49 PM, Diogo F. S. Ramos <span dir="ltr"><<a href="mailto:diogofsr@gmail.com" target="_blank">diogofsr@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">Laurent <<a href="mailto:laurent.orseau@gmail.com">laurent.orseau@gmail.com</a>> writes:<br>
<br>
> In particular, I'd like to use it with shawnpresser's unix domain socket package [2] and its `accept' function, but I'm not sure how to make one work with the other.<br>
<br>
</div>Writing more about how to deal with the unix domain socket blocking,<br>
this is how I do it: I make an input port from the socket using<br>
`scheme_make_fd_input_port' and I use `sync' with this input-port to<br>
accept connections. When `sync' returns I know there is something<br>
waiting to be accepted.<br>
</blockquote></div><br></div>