Fix a regression in the rlimit handling code caused by the myfork split.

This commit is contained in:
Sam Hocevar
2009-12-14 03:33:53 +00:00
committed by sam
parent cbe0249118
commit 4050565ba5
2 changed files with 20 additions and 1 deletions
+19
View File
@@ -37,6 +37,9 @@
#endif
#include <string.h>
#include <fcntl.h> /* for O_BINARY */
#if defined HAVE_SYS_RESOURCE_H
# include <sys/resource.h> /* for RLIMIT_AS */
#endif
#include "common.h"
#include "opts.h"
@@ -47,6 +50,22 @@
#include "md5.h"
#include "timer.h"
#if defined RLIMIT_AS
# define ZZUF_RLIMIT_MEM RLIMIT_AS
#elif defined RLIMIT_VMEM
# define ZZUF_RLIMIT_MEM RLIMIT_VMEM
#elif defined RLIMIT_DATA
# define ZZUF_RLIMIT_MEM RLIMIT_DATA
#else
# undef ZZUF_RLIMIT_MEM
#endif
#if defined RLIMIT_CPU
# define ZZUF_RLIMIT_CPU RLIMIT_CPU
#else
# undef ZZUF_RLIMIT_CPU
#endif
static int run_process(struct opts *, int[][2]);
#if defined HAVE_WINDOWS_H
+1 -1
View File
@@ -54,7 +54,7 @@
# include <sys/wait.h>
#endif
#if defined HAVE_SYS_RESOURCE_H
# include <sys/resource.h>
# include <sys/resource.h> /* for RLIMIT_AS */
#endif
#include "common.h"