FreeBSD 8: libusb async mode + select(2) = nogo?

Hans Petter Selasky hselasky at c2i.net
Fri Jul 23 15:00:50 UTC 2010


On Friday 23 July 2010 15:36:14 Peer Stritzinger wrote:
> Hi,
> 
> I'm using libusb to talk to a generic device (thats being also
> developed by me), synchronous works fine now.
> 
> Asynchronous mode with blocking libusb_handle_events() works also.
> 
> Now I'm trying to also talk to non USB file descriptors.  For this I'm
> using select(2), filling the sets from libusb_get_pollfds() results.
> 
> Somehow the select call never returns (no timeouts), if It gets some
> external trigger (like stopping in the debugger can continuing) it
> returns and has plausible return values.
> 
> Looking into libusb I find that it uses poll(2) internally.
> 
> Is select(2) supposed to work with libusb fd'?
> 
> Should I rather use poll(2)?  (I do like select more -- more BSDish).
> 

What are the polling flags you are using?

--HPS


More information about the freebsd-usb mailing list