From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21442 invoked from network); 13 Dec 1999 10:25:32 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 13 Dec 1999 10:25:32 -0000 Received: (qmail 21707 invoked by alias); 13 Dec 1999 10:25:23 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 9011 Received: (qmail 21699 invoked from network); 13 Dec 1999 10:25:22 -0000 Subject: Re: PATCH (and another bug report): Re: zsh script and SIGCONT In-Reply-To: <991212200800.ZM8901@candle.brasslantern.com> from Bart Schaefer at "Dec 12, 1999 8: 7:59 pm" To: schaefer@candle.brasslantern.com (Bart Schaefer) Date: Mon, 13 Dec 1999 10:25:16 +0000 (GMT) Cc: zsh-workers@sunsite.auc.dk, nirva@ishiboo.com X-Mailer: ELM [version 2.4ME+ PL48 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: From: Zefram Bart Schaefer wrote: >Even worse than this ... if you read the script with ". p2", then ^Z only >stops the "sleep 1" and the loop keeps going. All three cases ought to >behave the same as executing the loop at the top-level prompt. They can't. A while loop requested in the current shell *can't* be backgrounded after being started, any more than you could background a builtin. The loop has to be able to affect shell variables and so on, which means it has to execute in tthe shell process. Of course, if it's explicitly backgrounded when started, that's a different matter. -zefram