]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
vt(4): CONS_HISTORY/CONS_CLRHIST should operate on issuing terminal
authorJason A. Harmening <jah@FreeBSD.org>
Sun, 2 Aug 2020 20:18:37 +0000 (20:18 +0000)
committerJason A. Harmening <jah@FreeBSD.org>
Sun, 2 Aug 2020 20:18:37 +0000 (20:18 +0000)
commit4fdb1b227cf6853f31fb655bc3e327ae16e7f09b
tree9b107f72d0304b71c84c48d656181758c948b426
parent9fce5c4b3ce8580bb441923d0174df797f74a860
vt(4): CONS_HISTORY/CONS_CLRHIST should operate on issuing terminal

Currently the CONS_HISTORY and CONS_CLRHIST ioctls modify the state of the
active terminal instead of the terminal against which the ioctl was issued.
Because of the way vidcontrol(1) works, these are the same in most cases.
But a poorly-timed window switch can make them differ. This is reproducible
by issuing e.g. 'vidcontrol -s 2 && vidcontrol -C' to switch from vty 1 to
vty 2; teken will reset the cursor position on vty 1 but vt(4) will clear
the history buffer of vty 2, producing an interesting state of affairs.

Differential Revision: https://reviews.freebsd.org/D25564
sys/dev/vt/vt_core.c