Bug 4357 - the X server should check VT status
Summary: the X server should check VT status
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Server/General (show other bugs)
Version: 6.8.2
Hardware: All Linux (All)
: high minor
Assignee: Adam Jackson
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-09-05 13:51 UTC by Samuel Thibault
Modified: 2014-09-12 16:37 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Samuel Thibault 2005-09-05 13:51:44 UTC
Hi,

When running "X vt2" while something already runs on vt2 (getty for instance),
X doesn't get keypresses (getty does), which is kind of annoying for merely
killing the server for instance :)

In Xserver/hw/xfree86/os-support/linux/lnx_init.c, there should be some
check like when VTnum != -1 && !ShareVTs:

    struct vt_stat vtstat;
 
    if ((ioctl(fd, VT_GETSTATE, &vtstat) < 0))
	FatalError("failed to query vt %d availability", vtno);
 
    if (vtstat.v_state & (1<<vtno))
	FatalError("/dev/%s: already in use", tty);
 
fd being opened from /dev/tty0.

Only vt 1-15 can be checked this way (because of the size of vtstat.v_state),
but this is safer than nothing.

Regards,
Samuel
Comment 1 Adam Jackson 2005-10-21 23:26:18 UTC
taking
Comment 2 Daniel Stone 2007-02-27 01:27:54 UTC
Sorry about the phenomenal bug spam, guys.  Adding xorg-team@ to the QA contact so bugs don't get lost in future.
Comment 3 chemtech 2013-03-15 14:36:53 UTC
Samuel Thibault 
Do you still experience this issue with newer soft ?
Please check the status of your issue.
Comment 4 Samuel Thibault 2014-09-12 16:37:39 UTC
It seems I never got a mail for comment from chemtech 2013-03-15. I've just tried with Xorg 7.7, I don't have the issue any more. I guess that's thanks to input & evdev.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.