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

Re: bug in zsh wait builtin - rhbz#1150541

> } >
> } > I would say that any further change made for this should also be under
> } > the auspices (so to speak) of POSIX_JOBS.
> }
> } That would already cover the cases in the "bug" report, in fact.
> I don't think it would, because the report starts two background jobs
> and then waits for the one started first.  The current implementation
> only allows the most recent $! to be waited for after it exits.

This is indeed the case, and I revised the bz report accordingly.
Also, I should have mentioned
https://bugzilla.redhat.com/show_bug.cgi?id=1150554 rather than the
one in $subject.
(1150541 is for zsh 4.3.10, which doesn't seem to have POSIXJOBS)

> } I'm not really sure why we wouldn't just implement this particular
> } feature generally, despite the current status.  Is there any reason why
> } you'd *want* "wait" to give you an error (which isn't a particularly
> } useful message) owing to a race condition you can't control?
> There are a lot of error messages that a script probably doesn't want
> but an interactive user might.  Why do you want "wait %3" to report
> "%3: no such job"?  If nobody wants it, why did it take us 25 years
> to figure that out?
I believe that reporting an error for a non-existing job like this
makes sense, it just doesn't for pids obtained through $!.

Kind regards

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