read() from a removed device

Frank Schäfer
Mon Jul 6 16:56:30 GMT 2020


I just noticed that read() from a usb-serial device doesn't fail after 
the device got (physically) removed.
I would expect it to return -1 and set an appropriate errno, but it 
returns 0 (no error, no bytes read) instead.
Is this the correct/expected behavior or a bug ?

Frank Schäfer

More information about the Libc-help mailing list