Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
use of rand() in zsh
- X-seq: zsh-workers 50771
- From: Clinton Bunch <cdb_zsh@xxxxxxxxxxx>
- To: "zsh-workers@xxxxxxx" <zsh-workers@xxxxxxx>
- Subject: use of rand() in zsh
- Date: Mon, 10 Oct 2022 18:32:46 -0500
- Archived-at: <https://zsh.org/workers/50771>
- List-id: <zsh-workers.zsh.org>
Is there a reason that zsh goes out of the way (srand_deterministic) to
use the least random "random" function on modern Unix? I would think a
zrandom function that used getrandom() or arc4random() or /dev/urandom
would serve better. But before I write one, I wanted to know if there
was a reason that isn't obvious to me.
(I have an idea for a new module builtin that solved the mktemp race in
zsh scripts and it should use a better random source than rand())
Messages sorted by:
Reverse Date,
Date,
Thread,
Author