On Thu, 13 Jul 2006 22:56:07 +0400, Sergei Organov <[EMAIL PROTECTED]> wrote:
> >> 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. > > Doesn't seem to be the case. Here is the code: My bad. You only get HUP if your controlling terminal disconnects, not just any terminal. > >> 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. > > No wonder udev can do it, but it's more a solution that distros should > provide, and I'm afraid it's not that simple to provide a general one > due to possible collisions between different devices, at least I recall > I did see some discussions of the involved issues. Probably so. But distros cannot just ship a static rule. They need some software, scripts, or templates, which would get the attached printer's VID/PID, write it out as udev rule. If udev provided something like it... -- Pete ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel