suspend question

Guido van Rossum guido at piring.cwi.nl
Mon Sep 11 22:08:09 AEST 1989


The following puzzles me: if I start a background process with a shell
escape from an editor (so the editor's shell escape command returns
while the process remains in the background), and then suspend the
editor wit ^Z, the background process dies.  This happens in various
editors (ed, vi), shells (csh, ksh) and OS versions (Ultrix 2.2 and 3.1,
BSD 4.3tahoe, SunOS 4.0.3), to such diverse applications as sleep and
xterm.

A little test program shows that it dies of the SIGTSTP that is sent to
the process group, which is strange because the man page for sigvec
promises that the process will be suspended, not killed in this case
(default signal action).

The only explanation that I can find is that the kernel decides that
since the process's parent has died, it makes no sense to suspend it;
however, since it was started by a non-interactive shell (from the
editor's shell escape), it is in the same process group as the editor
from which it was (indirectly) started.

Any gurus care to explain the reason for this behavior?

--
Guido van Rossum, Centre for Mathematics and Computer Science (CWI), Amsterdam
guido at cwi.nl or mcvax!guido or guido%cwi.nl at uunet.uu.net
"You're so *digital*, girl!" -- Neneh Cherry



More information about the Comp.unix.wizards mailing list