Date: Tue, 24 May 2005 12:53:27 +0200 From: Dirk Gouders <gouders@et.bocholt.fh-ge.de> To: freebsd-usb@freebsd.org Subject: poll(2)ing or select(2)ing /dev/usb0 Message-ID: <200505241053.j4OArR2c000390@musashi.et.bocholt.fh-gelsenkirchen.de>
next in thread | raw e-mail | index | archive | help
Hello, in the section USB CONTROLLER INTERFACE the manual page usb(4) says that one can use poll(2) on /dev/usbN to get noticed when USB devices are connected or disconnected. Now, I wrote two small programs to play with poll(2) and select(2) on /dev/usb0 and see what happens if I connect/disconnect a USB device, but nothing happens. As the manual page does not say what events to poll(2) for, I just turned on all bits in the events mask and the programs work fine on the event interface /dev/usb. I am now wondering, if it is correct what the manual page says about poll(2)ing /dev/usbN. If so, what results should be expected, if several processes are accessing /dev/usb0 (usually usbd(8) is also running and it also has opened /dev/usb0 on my machine)? Dirk
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200505241053.j4OArR2c000390>