From owner-cvs-all Tue Feb 6 2:29:59 2001 Delivered-To: cvs-all@freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 1D0E737B503; Tue, 6 Feb 2001 02:29:35 -0800 (PST) Received: (from cracauer@localhost) by freefall.freebsd.org (8.11.1/8.11.1) id f16ATZR98103; Tue, 6 Feb 2001 02:29:35 -0800 (PST) (envelope-from cracauer) Message-Id: <200102061029.f16ATZR98103@freefall.freebsd.org> From: Martin Cracauer Date: Tue, 6 Feb 2001 02:29:34 -0800 (PST) To: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: cvs commit: src/bin/sh jobs.c X-FreeBSD-CVS-Branch: HEAD Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG cracauer 2001/02/06 02:29:34 PST Modified files: bin/sh jobs.c Log: 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 Revision Changes Path 1.31 +3 -2 src/bin/sh/jobs.c To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message