Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
broken random variable
- X-seq: zsh-workers 44851
- From: . . <apatiskogen@xxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: broken random variable
- Date: Sat, 19 Oct 2019 00:38:51 -0500
- Authentication-results: mxback14o.mail.yandex.net; dkim=pass header.i=@yandex.com
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yandex.com; s=mail; t=1571463531; bh=DDSy5KfzgCQNiqof8vTT8hwamvg0B8Lg4bObzBRvu28=; h=Message-Id:Date:Subject:To:From; b=TQVDJPvi9eo/v20wVfpg/5FZtnEn3MpAD5wSPhtcRSnYSmYAPuqFJCsgMbnrn2w1j 3kG2ctHvuBr7/yJn5Bv8LL0qgY+uHf88cfkS0SX2SG5rYSK8AuMZJqurrqWArX+6Ng seHwh2IthK1kidTdnSpQDgmX7wba3tCD4g4EhBuE=
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- List-unsubscribe: <mailto:zsh-workers-unsubscribe@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
Hello, zsh-workers
I found a bug in the $RANDOM variable; on OpenBSD, the command "echo $RANDOM | tee" will print the same number
across different executions of the same command, and the value of "echo $RANDOM" will be the same as the last value.
At first I thought that this bug was limited to OpenBSD, because it was not reproduced on the website "rootnroll" which has
a demo for "oh my zsh", but today I tested another command on the website: "yes | while read; do echo $RANDOM; done | head",
and all the random numbers are the same across different executions of the command. I hope that's enough information for you.
I reported the first bug to OpenBSD on monday, and Theo de Raadt replied and said that I should tell you instead.
I guess this e-mail might be a bit late, but I was waiting for evidence that it can be reproduced elsewhere.
PS: I would recommend using "arc4random" on OpenBSD if that is at all possible.
Thanks for reading my message. Good day.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author