*BSD News Article 18772


Return to BSD News archive

Newsgroups: comp.os.386bsd.bugs
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!haven.umd.edu!uunet!walter!qualcom.qualcomm.com!unix.ka9q.ampr.org!karn
From: karn@unix.ka9q.ampr.org (Phil Karn)
Subject: More problems with GNU Emacs 19.16
Message-ID: <1993Jul23.082249.26633@qualcomm.com>
Sender: news@qualcomm.com
Nntp-Posting-Host: unix.ka9q.ampr.org
Reply-To: karn@servo.qualcomm.com
Organization: Qualcomm, Inc
Date: Fri, 23 Jul 1993 08:22:49 GMT
Lines: 37

Thanks to Nate Williams and Sean Fagan for pointers on fixing the
copy-on-write problems I have been seeing with Gnu Emacs 19.16.

I've run into another more serious problem. When I'm in Mail composing
a message and I enter "~v" to drop into a visual editor (I have
"VISUAL=emacs" in my environment) all works well as long as I have
DISPLAY set so that emacs uses the X windows server. However, if
DISPLAY is not set (e.g., I'm logged in via a pty), emacs will
immediately stop (ps status "T", trace stop) before displaying
anything. "kill -CONT" is ignored.

However, emacs 19.16 works just fine if I invoke it directly from the
login shell, even when DISPLAY is not set (termcap to the pty works
fine.)

This problem did not appear until I installed version 19.16 of GNU
Emacs.  I had been running version 18.something which worked fine.

I've isolated the problem somewhat, although I've not been able to fix
it yet. Emacs is stopping due to SIGTTOU or SIGTTIN signals
(background write/reads attempted to/from control tty). I suspect the
problem is caused by Mail unmasking all signals before it spawns off
the editor, and emacs doesn't catch or ignore them.

I did try modifying emacs to ignore these two signals. This caused
emacs to at least get as far as displaying some output (which hadn't
happened before) but then it wouldn't respond to the keyboard. It
seemed to be looping, consuming CPU time.

Before I dig further into this, has anyone else encountered the same
problem and hopefully fixed it? At this point I'm not sure who is at
fault, Mail for not setting the signal actions properly before execing
emacs, or emacs for not catching them. I'd like to fix the right
program.

Phil