$ perl -E' rand; my $pid = fork; srand if $ARGV[0]; say rand; waitpid($pid, 0); ' 0 0.458778299481736 0.458778299481736 $ perl -E' rand; my $pid = fork; srand if $ARGV[0]; say rand; waitpid($pid, 0); ' 1 0.656664192517386 0.153404296449484
(The seed is determined the first time rand is called, so the problem only manifests itself if rand is called before fork.)
In reply to Re^2: shuffle in Parallel::ForkManager;
by ikegami
in thread shuffle in Parallel::ForkManager;
by plagent
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |