On Sun, Mar 29, 2026 at 11:40:56AM +0200, Stian Skjelstad wrote:
> > Actually what you're telling us is that there's a defect in (presumably
> Linux)
> > which should be documented in read(2).  Once you've gotten it documented
> in
> >the proper place (Linux manpages), then others can use the documentation.
> 
> It is normal for read() to return 0, without an error when EOF is reached.
> This is how you detect EOF/closed on sockets and files. Should TTY behave
> differently?

man read(2)

       EBADF  fd is not a valid file descriptor or is not open for reading.

Klaas is describing a condition which isn't in the manpage - ymmv.

-- 
Thomas E. Dickey <[email protected]>
https://invisible-island.net

Attachment: signature.asc
Description: PGP signature

Reply via email to