Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!sri-unix!teknowledge-vaxc!mkhaw From: mkhaw@teknowledge-vaxc.UUCP Newsgroups: comp.unix.questions,comp.unix.wizards Subject: question - 4bsd ^Z handling and stopping a pipe Message-ID: <13907@teknowledge-vaxc.ARPA> Date: Sat, 20-Jun-87 23:38:47 EDT Article-I.D.: teknowle.13907 Posted: Sat Jun 20 23:38:47 1987 Date-Received: Sun, 21-Jun-87 11:58:02 EDT Organization: Teknowledge, Inc., Palo Alto CA Lines: 20 Keywords: causes problems in the Elm mail program Xref: utgpu comp.unix.questions:2542 comp.unix.wizards:2565 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 does 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