[tex-k] Uninterruptible loop in web2c TeX
karl at freefriends.org
Thu Sep 3 23:49:01 CEST 2020
> Please help me to understand what is the intended effect of ^C when
> TeX is waiting for input.
It is system-dependent.
> As I understand it, the effect is the same as pressing ^M when nothing
> was input, with the
> only difference that "interrupt" is set to 1.
Here I don't agree. When a user presses CTRL-C, they don't expect
"nothing" to happen, i.e., equivalent to a return. They expect an
interrupt signal to be processed.
Especially, I have a hard time understanding why it prints
(Please type a command or say `\end')
if I press Enter in response to ? prompt which appears after ^C.
I agree it would be better for web2c not to say that in that particular
case. However, it is harmless, and it would take me more hours to debug
it, so I'm not going to.
And why TeX is silently terminated after ^C is pressed in response
to ** prompt?
Personally I think that is desirable behavior. I don't remember
specifically programming it that way, but I'm happy that that is what
All of this behavior relating to CTRL-C is legitimately
system-dependent, so no reasonable choice is "wrong". Do as you like in
your implementation. --happy interrupting, karl.
More information about the tex-k