3 ms·
Why does that matter? The parent will eventually return from the signal handler and resume execution. What does fork have to do with anything? arc4random (or wh
by tedunangst 9y ago
Why does that matter? The parent will eventually return from the signal handler and resume execution. What does fork have to do with anything? arc4random (or whatever you want to call it) isn't marked signal safe.
- cperciva 9y agoThe child will also eventually return from the signal handler and resume execution. In the middle of the PRNG, thus returning the same random numbers in both processes. I'm not sure what you mean by "arc4random isn't marked signal safe" -- you mean it can't be used in any process which receives signals?