From a9f36d288c287f691f9a21fb9d747f45673236cf Mon Sep 17 00:00:00 2001 From: Christopher Faylor Date: Tue, 14 Sep 2004 23:44:50 +0000 Subject: * 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. --- winsup/cygwin/fork.cc | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'winsup/cygwin/fork.cc') diff --git a/winsup/cygwin/fork.cc b/winsup/cygwin/fork.cc index c65c22d39..08edff220 100644 --- a/winsup/cygwin/fork.cc +++ b/winsup/cygwin/fork.cc @@ -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]))) -- cgit v1.2.3