Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Shell job structure



On Thu, 24 Oct 2013 22:02:14 -0700
Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> 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



Messages sorted by: Reverse Date, Date, Thread, Author