read() from a removed device
Mon Jul 6 17:31:45 GMT 2020
Am 06.07.20 um 19:17 schrieb Florian Weimer:
> * Frank Schäfer via Libc-help:
>> 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 ?
> You need toask on one of the kernel mailing lists. glibc just calls
> into the kernel and reports back whatever it receives from there.
Guess what the kernel devs say when I report this issue to them... ;)
Can I read your reply as "this is supposed to work as you expect from
glibc side" ?
How does the "call into the kernel" look like ?
More information about the Libc-help