On Tue, Jul 07, 2020 at 04:49:31PM +0200, Frank Schäfer wrote: > Hi, > > I recently noticed that read() from a usb-serial device does not fail after > the device got removed. > Is this really the correct/expected behavior or a bug ? You application did not get the hangup event and stop reading? > I would expect it to return -1 and set an appropriate errno, but it returns > 0 (no error, no bytes read) instead. 0 is correct here, why would there be an error? There's no data for you to read from a device that is gone :) thanks, greg k-h