read() from a removed device

Frank Schäfer fschaefer.oss@googlemail.com
Mon Jul 6 16:56:30 GMT 2020


Hi,

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 ?

Regards,
Frank Schäfer


More information about the Libc-help mailing list