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)
changes/49/4849/1
nils-ohlmeier 19 years ago committed by Victor Seva
parent 345a3f111e
commit 7a454d5895

@ -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