From 73c6029944b44f3e88040c33146d1e133b187ca4 Mon Sep 17 00:00:00 2001 From: Roderick Schertler Date: Wed, 9 Sep 1998 19:52:48 -0400 Subject: [PATCH] seed srand from /dev/urandom when possible Message-ID: <20567.905399568@eeyore.ibcinc.com> p4raw-id: //depot/perl@1847 --- pod/perlfunc.pod | 3 ++- pp.c | 33 +++++++++++++++++++++++++++++++-- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/pod/perlfunc.pod b/pod/perlfunc.pod index b20981d..a300f4a 100644 --- a/pod/perlfunc.pod +++ b/pod/perlfunc.pod @@ -3618,7 +3618,8 @@ root of C<$_>. =item srand Sets the random number seed for the C operator. If EXPR is -omitted, uses a semi-random value based on the current time and process +omitted, uses a semi-random value supplied by the kernel (if it supports +the F device) or based on the current time and process ID, among other things. In versions of Perl prior to 5.004 the default seed was just the current C. This isn't a particularly good seed, so many old programs supply their own seed value (often C