usb hotplug usb-serial und remove device

Andre Landwehr andrel at cybernoia.de
Mon Jul 28 14:55:57 CEST 2008


On Mon, 28 Jul 2008 14:30:17 +0200
Michael Westermann <michael at dvmwest.de> wrote:

> ich habe folgende Problematic. Ich habe ein Gerät welches an ttyUSB0
> hängt via usb-serial hängt. Das ganze läuft auf debian oldstable ak
> sarge und kernel 2.6.22.
> 
> In einer Schleife werden via select und read date vom Gerät geliefert.
> Wenn ich das USB Gerät vom Bus abziehe und wieder dran stecke.
> Bekomme ich vom select angezeigt dass daten vorhanden sind.
> der read kommt dann mit 0 zurück.
> (...code...)

Es verhält sich doch eigentlich alles so wie es soll. select() sagt
dir, daß auf einem der Filedescriptoren was passiert ist, und wenn
read() mit 0 zurückkommt, heißt das end-of-file. Genau den Fall würde
ich abfangen.

Gruß, Andre

-- 
Andre Landwehr, Ricklinger Stadtweg 42, D-30459 Hannover
Phone: +49-(0)511-1054932, Mobile: +49-(0)175-4648375

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lug-owl.de/pipermail/linux/attachments/20080728/6fe8a5fe/attachment.sig>


More information about the Linux mailing list