]> 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, 16 Jan 2024 02:55:59 +0000 (20:55 -0600)
commit30189156d325fbcc9d1997d791daedc9fa3bed20
tree25398a02c260f9b358079db40cb45ab49240c282
parent522083ffbd1ab9b485861750e889d606dc75ed0a
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
tests/sys/kern/Makefile
tests/sys/kern/tty_pts.c [new file with mode: 0644]