* cygtls.h: Add alignment kludge to fix disparity between compilers.

* tlsoffsets.h: Regenerate.
* fork.cc (slow_pid_reuse): Use define to control number of pids held to
prevent pid reuse.
This commit is contained in:
Christopher Faylor
2004-09-14 23:44:50 +00:00
parent 98650d2fa2
commit a9f36d288c
4 changed files with 75 additions and 55 deletions

View File

@ -31,6 +31,8 @@ details. */
#include "cygmalloc.h"
#include "cygthread.h"
#define NPIDS_HELD 8
/* Timeout to wait for child to start, parent to init child, etc. */
/* FIXME: Once things stabilize, bump up to a few minutes. */
#define FORK_WAIT_TIMEOUT (300 * 1000) /* 300 seconds */
@ -321,7 +323,7 @@ fork_child (HANDLE& hParent, dll *&first_dll, bool& load_dlls)
static void
slow_pid_reuse (HANDLE h)
{
static NO_COPY HANDLE last_fork_procs[8] = {0};
static NO_COPY HANDLE last_fork_procs[NPIDS_HELD] = {0};
static NO_COPY unsigned nfork_procs = 0;
if (nfork_procs >= (sizeof (last_fork_procs) / sizeof (last_fork_procs [0])))