Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug/regression: tt(RANDOM) seed not updating when $RANDOM is used in a pipe
On Wed, Jun 28, 2023 at 7:46 PM Eric Cook <llua@xxxxxxx> wrote:
>
> On 6/28/23 16:10, Jon Oster wrote:
> > In 5.8.1, $RANDOM seems not to update its state when the command $RANDOM
> > was used in is piped somewhere. For example:
> >
> > Is this considered a bug? Or is it intended behaviour?
> >
> > [1] https://sourceforge.net/p/zsh/code/ci/faf0035e532cde45528806e7a05ad28a0ab7c0fb/
>
> The LHS of the pipe should be a subshell, so the behavior is intentional.
This was, however, an unanticipated side-effect of the referenced
commit. It changed behavior (that, before, did not conform to the
documentation) without that fact being called out in any of our files
that serve as release notes.
It opens the question of whether anything else that previously was
"pre-fork" might have changed behavior at that point.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author