The real problem is that the code must be aware of possible errors in the filesystem. Assuming that the file-descriptor will always be available is a naive approach that should be corrected (at least if you really want the program to run for months unattended).
*Jordi Soucheiron* Software Engineer [email protected] *DEXMA* Parc Tecnològic Barcelona Nord c/ Marie Curie, 8-14 (Oficina 227) ES-08042, Barcelona t: (+34) 93 181 01 96 www.dexmatech.com Follow us on Twitter <http://www.twitter.com/dexma> and Linkedin<http://www.linkedin.com/company/247838> 2011/9/6 Rainer Stratmann <[email protected]> > Am Tuesday 06 September 2011 08:54:16 schrieb Sascha Blümle: > > Hi Jordi, > > > > is there any attempt going on to fix the basic problem and not only to > cure > > the pain? If the device will get disconnected (because of which reason > > even) > That will not cause a crash. > You can close the file with the file-handle. > And then open another file and get a new file-handle. > > there will be an open file-handle left and the application will run > > into eternity. > > > > Thank you for your efforts. > > > > BR, Sascha > > > > > You'll have to manage this kind of exceptions. Using udev to create a > > > link to the last ttyUSBX device created could be useful. I use rules > like > > > this freqüently: > > > KERNEL=="ttyUSB[0-9]*" , SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403" , > > > ATTRS{idProduct}=="6001" , ATTRS{product}=="USB-RS485 Cable" , > > > SYMLINK+="ftdi485" > > > > > > *Jordi * > > > > _______________________________________________ > Voyage-linux mailing list > [email protected] > http://list.voyage.hk/mailman/listinfo/voyage-linux >
_______________________________________________ Voyage-linux mailing list [email protected] http://list.voyage.hk/mailman/listinfo/voyage-linux
