All of lore.kernel.org
 help / color / mirror / Atom feed
* read() from removed usb-serial device
@ 2020-07-07 14:49 Frank Schäfer
  2020-07-07 15:16 ` Johan Hovold
  2020-07-07 15:19 ` Greg KH
  0 siblings, 2 replies; 3+ messages in thread
From: Frank Schäfer @ 2020-07-07 14:49 UTC (permalink / raw)
  To: Johan Hovold; +Cc: linux-usb@vger.kernel.org

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 ?

I would expect it to return -1 and set an appropriate errno, but it 
returns 0 (no error, no bytes read) instead.

According to the glibc developers "glibc just calls into the kernel and 
reports back whatever it receives from there."

Regards,
Frank


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-07-07 15:27 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-07-07 14:49 read() from removed usb-serial device Frank Schäfer
2020-07-07 15:16 ` Johan Hovold
2020-07-07 15:19 ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.