Re: Detecting removed ttyUSBn device with poll().

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Aug 30, 2014 at 04:56:52PM -0400, Dave Mielke wrote:
> is there any way to detect that a ttyUSBn serial device has gone away when 
> monitoring it for input with poll() (i.e. with POLLIN set)? I've tried also 
> setting POLLHUP and POLLERR, although the documentation says that isn't 
> necessary. I've also tried setting POLLRDHUP. I've tried enabling the HUPCL 
> termios attribute on the serial device. None of these seem to work, i.e. poll() 
> doesn't come out of its wait when I disconnect the USB to serial adapter. In 
> case it matters, I'm using 3.11.10-100.fc18.x86_64.

You should get a hangup signal on the device if it is removed, have you
tried that?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux