Messages in this thread | | | From | Oliver Neukum <> | Subject | Re: [linux-usb-devel] [PATCH] (linux 2.4.25) hangup on disconnect for usbserial module | Date | Mon, 5 Apr 2004 10:10:46 +0200 |
| |
Am Montag, 5. April 2004 07:49 schrieb Robert White: > Pasting the whole program is impractical, so here is the psudocode > > Open /dev/usb/ttyUSB0 > Build Poll structure with events = POLLIN for this descriptor > Call poll(&structure,1,-1) > > (Without the patch) If you pull the usb cable out of the computer, the > program above will never return from the poll. I was quite surprised, > especially since this didn't match the behavior of the ACM device that we > alternately use in our box. The hang is semi-terminal too, as nothing can > reattach to the file descriptor from below.
This is clearly unacceptable behavior.
[..] > The hangup semantic with all its ramifications (sighup if the device is a > controlling terminal etc.) is "good for me", and matches other kinds of > (USB and non-USB) devices, but I have no opinion on particular apps. I > considered adding an IOCTL and flag to control this but decided against for > the following reasons:
Unless you want to go for reattaching, which I wouldn't consider a good idea, I see no other choice. I did a quick look at the drivers and the other driver hanging there is usb-midi. I haven't checked the serial drivers not using generic_disconnect() though.
Regards Oliver
- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |