From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29372 invoked by alias); 26 Oct 2013 22:53:25 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 31905 Received: (qmail 16631 invoked from network); 26 Oct 2013 22:53:10 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:in-reply-to :references:mime-version:content-type:content-transfer-encoding; bh=ixqQGNcLPmRx87MOSgr7y4gG1e2lli72nlKCJwEhA6w=; b=P3H2BN7mTU9F0d08l2rSOV/tgLP7pOkY0vhrddqy1ftIWR1oW6Rac5wK0WhHJKvmrP q0gaM+n3ArsXOvGlnSkqY1NxNNv6rg1lwhiwaL102hRSLhTRgbSjg6xV7KPIx5R6pIyO Iow6SBGfmzzkLDayh3KON8/DGkIWnQyE5szLTW2ejBJS7VvQv9r/vsW4X843s3g8odSL PCLJqFszS0bkm9OL1f363fKv+2/v0sEuY13gCpuv/7zzbuBO1HpB4w4OavSxac0+PDNJ JxippxHsRdSSx7sVRJLpUW1AcI2GRVJJ68XhEDmjQNgaWNRwUj9l3PJalaxUfk0/8lo+ 9FqA== X-Gm-Message-State: ALoCoQkz9vo2XIyELIiwQlx6Ccno3FfflQ7w/TqsXY4pKpjHFVcgZY+SNbL9AdhYYa8PBS2FaX0q X-Received: by 10.194.1.139 with SMTP id 11mr12361820wjm.33.1382827986478; Sat, 26 Oct 2013 15:53:06 -0700 (PDT) X-ProxyUser-IP: 86.6.157.246 Date: Sat, 26 Oct 2013 23:53:04 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Not quite out of the pipestatus woods yet ... Message-ID: <20131026235304.3236a1c1@pws-pc.ntlworld.com> In-Reply-To: <131026095746.ZM8910@torch.brasslantern.com> References: <131025162543.ZM7466@torch.brasslantern.com> <131026004551.ZM32043@torch.brasslantern.com> <131026095746.ZM8910@torch.brasslantern.com> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Sat, 26 Oct 2013 09:57:46 -0700 Bart Schaefer wrote: > HOWEVER, with the "setopt MONITOR" added before the stress test, I have > had the shell go into a fast busy in acquire_pgrp() -- the while loop > condition never becomes false but the shell never gets SIGT* either. (Could perhaps be the same problem as the "i'm sorry, I can't do that without a terminal, dave" race with a function at the end of the pipeline?) > I think that's a separate problem, but: PWS, do you remember enough > about why there is an assumption that oldjobtab never needs to be set > back to NULL once it has been created? Or is this just a case of not > realizing that printjob() has multiple responsibilities, including the > reaping of old jobs? Orignally, I'm pretty sure (because for once I can remember doing it; perhaps the coffee machine was broken) that oldjobtab was created to allow you to look at the main shell's jobs from a subshell; they wouldn't be updated any more, but users weren't too worried about the races as they just wanted e.g. to be able to pipe the output of jobs in a one-off fashion. In that case, of course, there's no question of doing anything with it; it remains the same ancient history of the origignal shell until the subshell dies. There was also no question of job control in a subshell in those days --- that came significantly later --- so copying it and clearing the main jobtab, rather than using the latter in situ and assuming it was frozen, may just have been caution. If oldjobtab has suffered mission creep since then, there's a good chance that any additional circumstance has been overlooked. pws