NetBSD Problem Report #488
From gnats Sun Sep 18 19:13:46 1994
Received: from pain.lcs.mit.edu (pain.lcs.mit.edu [128.52.46.239]) by sun-lamp.cs.berkeley.edu (8.6.9/8.6.9) with ESMTP id TAA14443 for <gnats-bugs@sun-lamp.cs.berkeley.edu>; Sun, 18 Sep 1994 19:13:45 -0700
Message-Id: <199409190059.UAA06259@kolvir.blrc.ma.us>
Date: Sun, 18 Sep 1994 20:59:03 -0400
From: John Kohl <jtk@kolvir.blrc.ma.us>
Reply-To: jtk@kolvir.blrc.ma.us
To: gnats-bugs@netbsd.org
Subject: pcvt can lose keyboard control if you start an X server from an xterm
X-Send-Pr-Version: 3.2
>Number: 488
>Category: port-i386
>Synopsis: pcvt can lose keyboard control if you start an X server from an xterm
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: gnats-admin
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Sep 18 19:20:02 +0000 1994
>Closed-Date: Tue Oct 17 02:47:40 +0000 1995
>Last-Modified: Tue Oct 17 06:48:26 +0000 1995
>Originator: John Kohl
>Release: NetBSD-1.0_BETA
>Organization:
>Environment:
System: NetBSD kolvir 1.0_BETA NetBSD 1.0_BETA (KOLVIR) #16: Thu Sep 15 22:03:20 EDT 1994 jtk@kolvir:/u1/NetBSD-1.0/src/sys/arch/i386/compile/KOLVIR i386
>Description:
I think I tracked down the problem I had on NetBSD-current/i386 with
pcvt and losing keyboard control to a fresh X server trying to grab the
graphics mode on the same virtual console as an existing server.
>How-To-Repeat:
I didn't have problems when I ran 'xinit -- :1' from another virtual
console; only when I ran it _from within an xterm_ did I have problems.
>Fix:
Here's a patch which seems to fix the immediate problem; it makes the
VT_SETMODE fail if something tries to set process mode on the same VT as
an active process. However, this doesn't mean that "xinit -- vtY :1"
will start an X server on vtY--the context at the time of the VT_PROCESS
may still be the current virtual console if the existing X server
doesn't yield before the new one tries to set VT_PROCESS mode. Maybe
there's some missing handshake on the console switch completing.
==John
*** 1.1 1994/08/05 01:39:53
--- pcvt_ext.c 1994/08/07 02:55:52
***************
*** 2297,2302 ****
--- 2297,2306 ----
#endif /* PCVT_FAKE_SYSCONS10 */
case VT_SETMODE:
+ if (vsp->smode.mode == VT_PROCESS &&
+ ((struct vt_mode *)data)->mode == VT_PROCESS &&
+ vsp->proc != p)
+ return EBUSY; /* already in use on this VT */
vsp->smode = *(struct vt_mode *)data;
if(vsp->smode.mode == VT_PROCESS) {
vsp->proc = p;
>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->suspended
State-Changed-By: jtc
State-Changed-When: Thu Dec 22 09:59:20 1994
State-Changed-Why:
PR was forwarded to Hellmuth, who responded:
This has already been included/fixed in pcvt 3.20 beta 7.
PR suspended until pcvt 3.20 is integrated.
From: John Kohl <jtk@kolvir.arlington.ma.us>
To: gnats-bugs@NetBSD.ORG
Cc: Subject: re: port-i386/488: pcvt can lose keyboard control if you start an X server from an xterm
Date: Mon, 9 Oct 1995 23:59:16 -0400
This bug can be closed; the new pcvt fixes this and many other bugs.
==John
State-Changed-From-To: suspended->closed
State-Changed-By: jtc
State-Changed-When: Tue Oct 17 02:47:40 1995
State-Changed-Why:
We have integrated pcvt 3.32; and John has confirmed that the bug has
been fixed.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.