http://qs321.pair.com?node_id=724722


in reply to Re^2: fork(), IO::Socket::SSL and rand()
in thread fork(), IO::Socket::SSL and rand()

Just feeling that somehow ikegami's answer could be better phrased:

There are three points:

  • (added by me) calling srand() implicitly or explicitly with no seed should seed the way perl seeds (at least as the doc says for a perl version superior to 5.004)
  • then 'perldoc -f srand' says explicitly that one should not call srand() twice as you would lose randomness, so it seems that reseeding in each child is not the better option (one implicit call from use IO::Socket::SSL and one explicit call from each child)
  • finally actually delaying the implicit and only call to srand() can be done requiring IO::Socket::SSL in each child </it>

    IMHO this was the point made by fletch and at least another monk.

    cheers --stephan update: sorry not second post just answer