Thanks for you answer Diogo, it actually made me think that I could use `sync/timeout' instead of trying to poll directly: (sync/timeout 0 (scheme_fd_to_semaphore s MZFD_CREATE_READ #t))
Unfortunately this does not work :) It always returns #f. I tried with MZFD_CHECK_READ instead, but got a segfault. Probably I should wait for the documentation of `scheme_fd_to_semaphore' then. Laurent On Sun, Apr 21, 2013 at 9:49 PM, Diogo F. S. Ramos <diogo...@gmail.com>wrote: > Laurent <laurent.ors...@gmail.com> writes: > > > 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. > > Writing more about how to deal with the unix domain socket blocking, > this is how I do it: I make an input port from the socket using > `scheme_make_fd_input_port' and I use `sync' with this input-port to > accept connections. When `sync' returns I know there is something > waiting to be accepted. >
____________________ Racket Users list: http://lists.racket-lang.org/users