From: Linus Torvalds (torvalds@klaava.Helsinki.FI)
Date: 04/02/93


From: torvalds@klaava.Helsinki.FI (Linus Torvalds)
Subject: Re: Control-G bug in Emacs!!!
Date: Fri, 2 Apr 1993 14:26:42 GMT

In article <1phgma$ssm@nz12.rz.uni-karlsruhe.de> s_titz@ira.uka.de (Olaf Titz) writes:
>In article <1993Mar31.033333.20422@rkbhome.jti.com> richb@rkbhome.jti.com (Rich Braun) writes:
>
>> time: every once in a while, I'll accidentally hit ^G when I mean to
>> hit ^F in Emacs.
>
>> Under my current environment, Linux 0.99pl7 with Emacs 18.59.1
>> (11/12/92 posting) and Elm 2.4pl17 and the standard C-news/trn
>> distribution, any time I do this in news or mail I have to write out
>> the file, go over to another window and kill both programs (emacs and
>> trn/elm) because they're both "awake" and responding to input
>> simultaneously.
>
>I've noticed the problem too, and I've been told by some that the
>fault lies either with kernel signal handling or with bash signal
>handling (someone suggested using zsh). I've not tried new kernel or
>shell, though.

I'm still working on some final cleanups in the kernel signal handling
code (my current kernel delivers several signals "at once" and just
needs some final tweaking for me to be happy with it), but you might
want to try out the 0.99pre8-kernel if you are seeing the job control
problems: it should have most of the problems fixed. The new kernel is
in pub/OS/Linux/PEOPLE/Linus on nic.funet.fi, and I'm told it fixes the
problems with bash, at least.

It seems that some programs count on stricter signal delivery than
"older" linux kernels had: the new kernels now take care to deliver
signals more efficiently by using a new 'sigreturn()' system call and by
builing a small program on the stack to handle signal returns. It's not
exactly self-modifying code, but I don't think Dr Wirth would quite
approve.. :^]. But it all results in cleaner signal handling, and
allowed me to do things that were hard or impossible to do with the old
signal handling code. I'll probably be able to implement sigstacks with
the new code without undue problems, although I haven't actually looked
into it very far yet.

                Linus