[comp.mail.elm] question - 4bsd ^Z handler interaction with pipes

daemon@hplabsc.UUCP (06/23/87)

I've found that when I display a message in elm and ^Z at the "more" prompt,
I'm hung.  This seems to happen because elm is using a pipe to run the pager
program.  If I use "ps" from another tty to look at the hung login, I see
a parent elm process with garbage in the "ps" "COMMAND" field in device-wait
state, plus a child elm, whose child is a "sh -c more", whose child is the
"more" process that I stopped.  The "sh -c" and "more" process are in stopped
state.

The only way I've found to recover is to kill the "more" and "sh -c" both.

Are there any 4bsd gurus who can explain what a SIGTSTP handler needs to do
to prevent this?  Currently Elm's SIGTSTP handler just restores default
handling (SIG_DFL) and then a kill(0, SIGTSTP).

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

barry@adelie.Adelie.COM (Barry A. Burke) (06/23/87)

In article <2083@hplabsc.HP.COM> mkhaw@teknowledge-vaxc.ARPA (Michael Khaw) writes:
>
>I've found that when I display a message in elm and ^Z at the "more" prompt,
>I'm hung.  This seems to happen because elm is using a pipe to run the pager

We (adelie) have fixed this problem, along with SEVERAL OTHER related
problems. We will be posting the patches Real Soon Now, but they are quite
extensive. It may be better for us to integrate with Dave's next release - OR
- we'll have to distribute patches to the original version. It's doubtful our
patches will successfully apply to what most of the world is running today.

Yep- we really need a single integration point for patches to Elm. Wish we
could offer such service, but just as soon as we get the ^Z problem totally
fixed and isolate the Ultrix-ELM_deletes_/usr/spool/mail/<user>_mailboxes_
mysteriously bugs fixed, we're gonna back-shelf our efforts on this sucker.

Hang in there....help is On The Way!


-- 
LIVE:	Barry A. Burke, (617) 499-6370
USPS:	Adelie Corporation, 125 CambridgePark Drive Cambridge, MA  02140
UUCP:	barry@adelie.Adelie.COM / ..!{harvard,ll-xn,necntc,mirror}!adelie!barry
ARPA:	barry@adelie.Adelie.COM (via MX) / barry%adelie@harvard.Harva,# '*,#