]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
kern: pts: do not special case closed slave side
authorKyle Evans <kevans@FreeBSD.org>
Tue, 16 Jan 2024 02:55:59 +0000 (20:55 -0600)
committerKyle Evans <kevans@FreeBSD.org>
Tue, 30 Jan 2024 17:11:10 +0000 (11:11 -0600)
commit984128ce2d5eb7d3374dd4b245d443ec2f5d96b2
tree4e3f7dc7fb057c73d6719f6442decddadff40b53
parent2a05c20339082c19e64f9027f80706b8d24a082d
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

(cherry picked from commit 30189156d325fbcc9d1997d791daedc9fa3bed20)
sys/kern/tty_pts.c
tests/sys/kern/Makefile
tests/sys/kern/tty_pts.c [new file with mode: 0644]