On Thu, 13 Jul 2006 16:31:35 +0400, Sergei Organov <[EMAIL PROTECTED]> wrote:
> > 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. > > Well, simple test shows that an application just sees an EOF condition, > i.e., read() returns 0 when device is disconnected. You probably run it with effective stty -isig by zeroing termios. > Not that it's a huge problem, but I do feel somewhat uneasy about it. > > Can you think of a better way to handle this? > > No, not yet, -- I first wanted to see if there is some known > show-stopper here. If nobody sees any fundamental thing why it > shouldn't or just can't behave differently then now, I'll probably take > a closer look at it. Be my guest. We used to have a similar mechanism for storage devices in 2.4, but dropped it. It was complicated. > On the other hand, using udev rules to get stable names like > /dev/usb/iProduct:iSerial could be a better idea even though there are > other problems there, I think. The udev can do it. Unfortunately, I do not have an example of a rule right now, but I saw them flying by. Usually owners of multiply printers use those, so google for usblp+udev. -- Pete ------------------------------------------------------------------------- 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