Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Bug/regression: tt(RANDOM) seed not updating when $RANDOM is used in a pipe
- X-seq: zsh-users 29090
- From: Jon Oster <jon.i.oster@xxxxxxxxx>
- To: zsh-users@xxxxxxx
- Subject: Bug/regression: tt(RANDOM) seed not updating when $RANDOM is used in a pipe
- Date: Wed, 28 Jun 2023 22:10:52 +0200
- Archived-at: <https://zsh.org/users/29090>
- List-id: <zsh-users.zsh.org>
In 5.8.1, $RANDOM seems not to update its state when the command $RANDOM
was used in is piped somewhere. For example:
# echo $RANDOM
18163
# echo $RANDOM
23472
# echo $RANDOM
27685
# echo $RANDOM|cat
10178
# echo $RANDOM|cat
10178
# echo $RANDOM
10178
# echo $RANDOM
17862
This is new behaviour since I upgraded from 5.4.2 to 5.8.1. At first I
thought that it might be somehow related to multios, but the result is
the same with multios on or off. So, I did a bisect, and discovered that
faf0035e532cde45528806e7a05ad28a0ab7c0fb[1] is the commit that introduced
this behaviour.
Is this considered a bug? Or is it intended behaviour? Personally, I'd
argue it's a bug. Unfortunately, my C isn't good enough to try to fix and
submit a patch myself, but I tried to make this bug report as helpful as
possible.
[1] https://sourceforge.net/p/zsh/code/ci/faf0035e532cde45528806e7a05ad28a0ab7c0fb/
Messages sorted by:
Reverse Date,
Date,
Thread,
Author