Re: GGI and cli/sti in X

George (greerga@nidhogg.ham.muohio.edu)
Sun, 29 Mar 1998 19:10:32 -0500 (EST)


On Sat, 28 Mar 1998, Vagn Scott wrote:

>Linus Torvalds wrote:
>
>> The "kill -9" problem is so trivial to fix that it's scary: you make a
>> small setuid binary that runs as root (and makes sure to drop the
>> original user by doing a "setuid()" as the first thing). It saves the
>> old graphics mode information, switches into graphics mode, does a
>> "fork()" and starts up X as a normal user in the forked process.
>>
>> The small root-owned process then stays around, does a "wait()" on the
>> child (the X server) and when the X server exits it restores the screen
>> and everything is hunky dory.
>
>This, of course, is the challenge.
>If it can be done then the problem is solved.

Pardon my (extreme) ignorance of XFree86 internals and such but could a
SIGSEGV signal handler be used? You know, "Hey, I received a SIGSEGV, I
better restore the text screen and quit." (With, of course, setting a flag
so that it doesn't try to restore the screen if it receives another SIGSEGV
while restoring the screen.)

Then if you do a 'kill -9' on the X server from an xterm, it's your own
fault.

-George

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu