* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
* Please read the file COPYING, README and AUTHORS for more information.
- *
- * Process management
*/
#include "portab.h"
+/**
+ * @file
+ * Process management
+ */
+
#include "imp.h"
#include <assert.h>
#include <errno.h>
#include "conn.h"
#include "exp.h"
+#include "sighandlers.h"
#include "proc.h"
/**
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);
close(pipefds[0]);