> While testing ksh93u+m's recently added SRANDOM variable[1], I have
> discovered a bug in Cygwin's arc4random function. After using fork(),
> arc4random does not reseed itself, which causes the results to become
> predictable[2]. Below is a test case C program exhibiting the bug:
> 
> ...
> 
> [1]: https://github.com/ksh93/ksh/commit/00b296c
> [2]: https://github.com/ksh93/ksh/issues/711

FYI: There was a thread in Nov 2023 about rand() which might be related.

rand is not ISO C compliant in Cygwin
https://cygwin.com/pipermail/cygwin/2023-November/254735.html

conclusion of that thread:
https://cygwin.com/pipermail/cygwin/2023-November/254764.html

-- 
Problem reports:      https://cygwin.com/problems.html
FAQ:                  https://cygwin.com/faq/
Documentation:        https://cygwin.com/docs.html
Unsubscribe info:     https://cygwin.com/ml/#unsubscribe-simple

Reply via email to