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).<br>
<br clear="all"><b>Jordi Soucheiron</b><br>
Software Engineer<br><a style="color: rgb(102, 153, 0);" href="mailto:jsoucheiron@dexmatech.com" target="_blank">jsoucheiron@dexmatech.com</a><br>
<br>
<b>DEXMA</b><br>
Parc Tecnològic Barcelona Nord<br>c/ Marie Curie, 8-14 (Oficina 227)<br>ES-08042, Barcelona<br>t: (+34) 93 181 01 96<br><a href="http://www.dexmatech.com" target="_blank">www.dexmatech.com</a><br><br>Follow us on <a href="http://www.twitter.com/dexma" target="_blank">Twitter</a> and <a href="http://www.linkedin.com/company/247838" target="_blank">Linkedin</a><br>
<br><br>
<br><br><div class="gmail_quote">2011/9/6 Rainer Stratmann <span dir="ltr"><<a href="mailto:RainerStratmann@t-online.de">RainerStratmann@t-online.de</a>></span><br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
Am Tuesday 06 September 2011 08:54:16 schrieb Sascha Blümle:<br>
<div class="im">> Hi Jordi,<br>
><br>
> is there any attempt going on to fix the basic problem and not only to cure<br>
> the pain? If the device will get disconnected (because of which reason<br>
> even)<br>
</div>That will not cause a crash.<br>
You can close the file with the file-handle.<br>
And then open another file and get a new file-handle.<br>
<div class="im">> there will be an open file-handle left and the application will run<br>
> into eternity.<br>
><br>
> Thank you for your efforts.<br>
><br>
> BR, Sascha<br>
><br>
> > You'll have to manage this kind of exceptions. Using udev to create a<br>
> > link to the last ttyUSBX device created could be useful. I use rules like<br>
> > this freqüently:<br>
> > KERNEL=="ttyUSB[0-9]*" , SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403" ,<br>
> > ATTRS{idProduct}=="6001" , ATTRS{product}=="USB-RS485 Cable" ,<br>
> > SYMLINK+="ftdi485"<br>
> ><br>
> > *Jordi *<br>
<br>
<br>
<br>
</div><div><div></div><div class="h5">_______________________________________________<br>
Voyage-linux mailing list<br>
<a href="mailto:Voyage-linux@list.voyage.hk">Voyage-linux@list.voyage.hk</a><br>
<a href="http://list.voyage.hk/mailman/listinfo/voyage-linux" target="_blank">http://list.voyage.hk/mailman/listinfo/voyage-linux</a><br>
</div></div></blockquote></div><br>