From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15738 invoked by alias); 25 Oct 2013 10:01:07 -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: 31895 Received: (qmail 12302 invoked from network); 25 Oct 2013 10:01:01 -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=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 X-AuditID: cbfec7f5-b7ef66d00000795a-1f-526a4159bb35 Date: Fri, 25 Oct 2013 11:00:56 +0100 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Shell job structure Message-id: <20131025110056.1757a5ab@pwslap01u.europe.root.pri> In-reply-to: <131024220214.ZM8256@torch.brasslantern.com> References: <20131005223159.25fea6a0@pws-pc.ntlworld.com> <131006173621.ZM31831@torch.brasslantern.com> <20131007102529.5354f342@pwslap01u.europe.root.pri> <131007074049.ZM32707@torch.brasslantern.com> <20131008214437.41dc396a@pws-pc.ntlworld.com> <131024220214.ZM8256@torch.brasslantern.com> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplluLIzCtJLcpLzFFi42I5/e/4Vd1Ix6wgg67pVhYHmx8yOTB6rDr4 gSmAMYrLJiU1J7MstUjfLoErY9fn+8wFzRwVa9elNzBuZ+ti5OSQEDCRePluCiuELSZx4d56 oDgXh5DAUkaJre8PMUM4y5kklt/ezAhSxSKgKrG4/RgLiM0mYCgxddNssLiIgLjE2bXnweLC AgoSt3ZcAbN5BewlJmy9ywxicwpYSjTfPsYEMfQ7k8Tjff/AzuAX0Je4+vcTE8QZ9hIzr5xh hGgWlPgx+R7YIGYBLYnN25pYIWx5ic1r3jJPYBSYhaRsFpKyWUjKFjAyr2IUTS1NLihOSs81 0itOzC0uzUvXS87P3cQICcKvOxiXHrM6xCjAwajEw5swIzNIiDWxrLgy9xCjBAezkgjvbvus ICHelMTKqtSi/Pii0pzU4kOMTBycUg2MW4yWPD4jyvZ0xfLFExaZv5v1t4x/woY7605ken7s r41p2qF07qvzw2Lfyadu99/5v1zRr3NLTwNzXG3zwkv6lq1NF6x3RS+O6bZK5472u/PnaS7/ j3u3SzbOMZ7p0dsruapGcHsSi8Ised/A59FNT+zaVX9ZC9xV3fdPLC9OaqfBJZd3xX29SizF GYmGWsxFxYkAPhoH8SACAAA= On Thu, 24 Oct 2013 22:02:14 -0700 Bart Schaefer wrote: > } The job table would become a list of top-level jobs, while the job > } structure would have pointers to nested jobs. > > As I mentioned elsewhere, the procs list and "other" pointer into the > job table serve this function. > > It still might be done more cleanly, but at least we avoided a full > rewrite for now. There's a wider problem of what happens inside nested control structures, in particular functions. Consider what happens when you use "pipestatus" inside a function, and then try to apply it to a pipeline, that happens to run that function at the right hand end, after the whole pipeline has finished. Logically, at least, this requires some kind of hierarchical handling of jobs, not processes --- although simply saving and restoring the current job might be good enough. Does the current system take account of this kind of thing properly? If so, maybe things are better than I thought. pws