improved srand initialization according to perl docs.

thnks to dsemyonov. closes #8289

git-svn-id: http://svn.berlios.de/svnroot/repos/sipsak/trunk@412 75b5f7c7-cfd4-0310-b54c-e118b2c5249a
(cherry picked from commit ccb01c74cb4f5b2ddfaf282511fc313433d42eef)
(cherry picked from commit 7a454d5895)
mr4.1.2
nils-ohlmeier 20 years ago committed by Victor Seva
parent a4fc9502d1
commit df3f1c7db2

@ -902,7 +902,7 @@ int main(int argc, char *argv[])
/* this is not a cryptographic random number generator,
but hey this is only a test-tool => should be satisfying*/
srand(time(0) ^ getpid());
srand(time(0) ^ (getpid() + (getpid() << 15)));
if (processes > 1) {
if (signal(SIGCHLD , sigchld_handler) == SIG_ERR ) {

Loading…
Cancel
Save