Re: kill -9 <pid of X>

Linus Torvalds (torvalds@transmeta.com)
Wed, 12 Aug 1998 21:39:17 -0700 (PDT)


On Thu, 13 Aug 1998, Alan Cox wrote:
> > No there aren't. And get me off the Cc list.
>
> Linus you could start with the simple "My Xserver has hung in a tight loop
> with signals blocked", now I wont have to reboot case. I've seen X do exactly
> that before now. Normally trying to clean up from an out of memory or a sigsegv

Why is your X server in a tight loop with signals blocked?

For example, it _never_ makes any sense to block SIGSEGV. For all I know,
XFree86 may do it, but the whole point is that it is _wrong_ to try to fix
those kinds of bugs in the kernel, when what you guys should _really_ be
doing is to talk to the XFree86 guys and tell them they have a problem.

> Your daemon hanging around for a kill case doesnt work because there is
> a fundamental race between telling the card and the daemon about a state
> change in the video programming.

Umm?? There is no race, because the _only_ thing that changes the video
mode is the deamon. NOTHING else. So when the deamon decides to change
modes, it can do so - and doesn't ask anything for permission.

Anyway, my main gripe is not about making kernel changes - if somebody has
a valid concern about these things, I'm more than happy to accomodate
them. My gripe is that people think that it has to be solved in the kernel
_first_, without even looking at the application. In many cases (like the
silly "kill -9" thing) the problem is _soo_ much more easily solved in
user space that anybody who even thinks "kernel" is just completely out to
lunch.

For example, NOBODY has come up with a very real concern - that of
revoking direct graphics card privileges from a process. THAT is something
you need kernel support for, because regardless of whether you do various
video mode switching stuff etc in a loadable kernel module or in a
user-level deamon, nobody in their right mind would suggest that you don't
allow some direct hardware access to the application that writes to the
screen.

To me, this just makes me feel that none of the people here have thought
it through AT ALL. And quite frankly, before you've thought it through,
you should not think about kernels.

So my argument is really not one against adding features to the kernel. I
do that every effing day. My argument is about people obviously not having
spent one _ounce_ of common sense on the problems before spouting off
about needing kernel support.

Linus

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.altern.org/andrebalsa/doc/lkml-faq.html