Date: Thu, 24 Jul 1997 23:30:54 -0400 (EDT) From: Joe Traister <traister@mojozone.org> To: FreeBSD-gnats-submit@FreeBSD.ORG Subject: kern/4164: pcvt VT_WAITACTIVE ioctl busted Message-ID: <199707250330.XAA05743@manta.mojozone.org> Resent-Message-ID: <199707250340.UAA11372@hub.freebsd.org>
index | next in thread | raw e-mail
>Number: 4164
>Category: kern
>Synopsis: pcvt VT_WAITACTIVE ioctl busted
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Thu Jul 24 20:40:01 PDT 1997
>Last-Modified:
>Originator: Joe Traister
>Organization:
None
>Release: FreeBSD 2.2.2-RELEASE i386
>Environment:
FreeBSD 2.2.2-RELEASE with pcvt console
>Description:
The pcvt VT_WAITACTIVE ioctl, when passed a 0 third argument,
puts the calling process to sleep until the current vt is
switched away from. The syscons driver, when passed a 0 third
argument, waits until the vt represented by the passed file
descriptor is switched to. Both claim to be USL-compatible.
I wasn't sure which was correct, but the latter behavior seems
more useful, since the former doesn't care whether the current
vt is related to the calling process or not. Also, a comment
in the pcvt code makes it clear that the author was unsure of
the correct behavior.
>How-To-Repeat:
A code example would be rather involved, but can be provided.
A comparison of the code in scioctl() in i386/isa/syscons.c and
usl_vt_ioctl() in i386/isa/pcvt/pcvt_ext.c is straightforward.
>Fix:
*** pcvt_ext.c.dist Mon Jul 21 19:06:36 1997
--- pcvt_ext.c Mon Jul 21 20:40:58 1997
***************
*** 2653,2661 ****
if(i == -1)
{
- /* xxx Is this what it is supposed to do? */
int x = spltty();
! i = current_video_screen;
error = 0;
! while (current_video_screen == i &&
(error == 0 || error == ERESTART)) {
vs[i].vt_status |= VT_WAIT_ACT;
--- 2653,2660 ----
if(i == -1)
{
int x = spltty();
! i = minor(dev);
error = 0;
! while (current_video_screen != i &&
(error == 0 || error == ERESTART)) {
vs[i].vt_status |= VT_WAIT_ACT;
>Audit-Trail:
>Unformatted:
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199707250330.XAA05743>
