On Wed, Jul 12, 2006 at 03:42:14PM +0400, Sergei Organov wrote: > Suppose I have a usb-serial device managed, say, by the airprime > driver. When I connect it, it is attached to the /dev/ttyUSB0, then, > every disconnect/connect results in detaching from /dev/ttyUSB0 and > attaching back to /dev/ttyUSB0 *unless* there is an application that > keeps an opened fd got from open("/dev/ttyUSB0") while > disconnect/connect happens, in which case the device is attached to > /dev/ttyUSB1.
Yes, that's true. > It's OK that the application keeping the fd open can do nothing sensible > with it after corresponding device has been disconnected (and connected > back), but can the /dev/ttyUSB0 itself be freed for allocation at > disconnect time? Is there something fundamental that prevents it or > makes it undesirable? The application will get a signal that the device has "hung up" which usually causes it to automatically close the file handle, which is about the best that the kernel can provide. Can you think of a better way to handle this? thanks, greg k-h ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel