Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

use of rand() in zsh



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