daemon@hplabsc.UUCP (06/23/87)
In editmsg.c there is a setjmp()/logjmp() deal to handle SIGINT,
but it fails in two ways:
1) the setjmp occurs inside a while-loop, so if you interrupt before
having typed anything terminated with a newline, the SIGINT
handler gets called, and it tries to longjmp() to a context
that hasn't been set up yet so you get a "longjmp botch" and
Elm dies.
2) longjmp() takes 2 arguments, but the SIGINT handler calls longjmp
with only the jmp_buf argument, so (at least on my Ultrix
system) setjmp() always returns with a 0 value and you can't
ever abort by hitting interrupt.
Fix:
(Too little for a diff)
1) move the entire "if (setjmp ..." clause above the label "raw_input :"
2) give the call to longjmp() a second argument: a non-zero integer.
Mike Khaw
--
internet: mkhaw@teknowledge-vaxc.arpa
usenet: {hplabs|sun|ucbvax|decwrl|sri-unix}!mkhaw%teknowledge-vaxc.arpa
USnail: Teknowledge Inc, 1850 Embarcadero Rd, POB 10119, Palo Alto, CA 94303