Proc_Fork(PROC_STAT *proc, int *pipefds, void (*cbfunc)(int, short), int timeout)
{
pid_t pid;
+ unsigned int seed;
assert(proc != NULL);
assert(pipefds != NULL);
return -1;
}
+ seed = (unsigned int)rand();
pid = fork();
switch (pid) {
case -1:
return -1;
case 0:
/* New child process: */
+ srand(seed ^ (unsigned int)time(NULL) ^ getpid());
Signals_Exit();
signal(SIGTERM, Proc_GenericSignalHandler);
signal(SIGALRM, Proc_GenericSignalHandler);