freebsd_amp_hwpstate/bin/sh
Martin Cracauer adce2a1b4b Fix child's SIGSTOP behaviour in scripts.
When a child is receiving SIGSTOP, eval continues with the next
command.  While that is correct for the interactive case (Control-Z
and you get the prompt back), it is wrong for a shellscript, which
just continues with the next command, never again waiting for the
stopped child.  Noted when childs from cronjobs were stopped, just to
make more processes (by wosch).

The fix is not to return from a job wait when the wait returned for a
stopped child while in non-interactive mode.  This bahaviour seems to
be what bash2 and ksh implement.  I tested for correct behaviour for
finnaly killing the child with and without forgrounding it first.
When not foregrouding before killing, the shell continues with the
script, which is what the other shells do as well.

Reviewed by:	Silence on -current
2001-02-06 10:29:34 +00:00
..
bltin
funcs
Makefile
TOUR
alias.c
alias.h
arith.h
arith.y
arith_lex.l
builtins.def
cd.c
cd.h
error.c
error.h
eval.c
eval.h
exec.c
exec.h
expand.c
expand.h
histedit.c
init.h
input.c
input.h
jobs.c Fix child's SIGSTOP behaviour in scripts. 2001-02-06 10:29:34 +00:00
jobs.h
machdep.h
mail.c
mail.h
main.c
main.h
memalloc.c
memalloc.h
miscbltin.c
mkbuiltins
mkinit.c
mknodes.c
mksyntax.c
mktokens
myhistedit.h
mystring.c
mystring.h
nodes.c.pat
nodetypes
options.c
options.h
output.c
output.h
parser.c
parser.h
redir.c
redir.h
sh.1 mdoc(7) police: split punctuation characters + misc fixes. 2001-02-01 16:38:02 +00:00
shell.h
show.c
show.h
trap.c
trap.h
var.c
var.h