Date: Tue, 16 Jan 2024 02:56:57 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 239604] FIONREAD ioctl returns the wrong result on a master pty after the slave has been closed Message-ID: <bug-239604-227-4GE6vDvkrc@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-239604-227@https.bugs.freebsd.org/bugzilla/> References: <bug-239604-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D239604 --- Comment #1 from commit-hook@FreeBSD.org --- A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=3D30189156d325fbcc9d1997d791daedc9f= a3bed20 commit 30189156d325fbcc9d1997d791daedc9fa3bed20 Author: Kyle Evans <kevans@FreeBSD.org> AuthorDate: 2024-01-16 02:55:59 +0000 Commit: Kyle Evans <kevans@FreeBSD.org> CommitDate: 2024-01-16 02:55:59 +0000 kern: pts: do not special case closed slave side This would previously return 1 if the slave side of the pts was closed to force an application to read() from it and observe the EOF, but it's not clear why and this is inconsistent both with how we handle devices with similar mechanics (like pipes) and also with other kernels, such as OpenBSD/NetBSD and Linux. PR: 239604 Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D43457 sys/kern/tty_pts.c | 7 +---- tests/sys/kern/Makefile | 3 ++ tests/sys/kern/tty_pts.c (new) | 64 ++++++++++++++++++++++++++++++++++++++= ++++ 3 files changed, 68 insertions(+), 6 deletions(-) --=20 You are receiving this mail because: You are on the CC list for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-239604-227-4GE6vDvkrc>