]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/proc.c
Use srand()/rand() instead of srandom()/random(); seems to be more portable
[ngircd-alex.git] / src / ngircd / proc.c
index 217eb6d3ba17a3d22613caabfb2662e6c9f4cccc..54b3919c3374873664d52095cf990eb6f2619bbc 100644 (file)
@@ -62,7 +62,7 @@ Proc_Fork(PROC_STAT *proc, int *pipefds, void (*cbfunc)(int, short), int timeout
                return -1;
        }
 
-       seed = (unsigned int)random();
+       seed = (unsigned int)rand();
        pid = fork();
        switch (pid) {
        case -1:
@@ -73,7 +73,7 @@ Proc_Fork(PROC_STAT *proc, int *pipefds, void (*cbfunc)(int, short), int timeout
                return -1;
        case 0:
                /* New child process: */
-               srandom(seed ^ (unsigned int)time(NULL) ^ getpid());
+               srand(seed ^ (unsigned int)time(NULL) ^ getpid());
                Signals_Exit();
                signal(SIGTERM, Proc_GenericSignalHandler);
                signal(SIGALRM, Proc_GenericSignalHandler);