Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Strange function/pipestatus behavior, maybe a scope bug?
On Oct 24, 4:48pm, Peter Stephenson wrote:
} Subject: Re: Strange function/pipestatus behavior, maybe a scope bug?
}
} I can't see any problem here, which might not be too surprising if it's
} a race, but I don't see how the following fix can be wrong if pipestatus
} is now working: the most complicated case appears to be if it gets
} called multiple times and STAT_CURSH is set, but even there it looks
} like it's idempotent with respect to lastval (assuming the information
} hasn't changed, of course).
Unfortunately (see my patch which crossed in the mail with yours) there
are cases where updating lastval both from update_job() and then again
from print_job() will in fact end up with the wrong lastval. You have
to run some pipelines both with and without PIPEFAIL set to see this.
} I don't know if this potentially makes one of the calls removable.
I *suspect* that the call in update_job() is removable, but I got
inconsistent results from testing it both ways (hence my conclusion
that there's still a signal handling race).
Messages sorted by:
Reverse Date,
Date,
Thread,
Author