Changeset 4122 for zzuf


Ignore:
Timestamp:
Dec 14, 2009, 4:33:53 AM (10 years ago)
Author:
Sam Hocevar
Message:

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

Location:
zzuf/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • zzuf/trunk/src/myfork.c

    r4116 r4122  
    3838#include <string.h>
    3939#include <fcntl.h> /* for O_BINARY */
     40#if defined HAVE_SYS_RESOURCE_H
     41#   include <sys/resource.h> /* for RLIMIT_AS */
     42#endif
    4043
    4144#include "common.h"
     
    4750#include "md5.h"
    4851#include "timer.h"
     52
     53#if defined RLIMIT_AS
     54#   define ZZUF_RLIMIT_MEM RLIMIT_AS
     55#elif defined RLIMIT_VMEM
     56#   define ZZUF_RLIMIT_MEM RLIMIT_VMEM
     57#elif defined RLIMIT_DATA
     58#   define ZZUF_RLIMIT_MEM RLIMIT_DATA
     59#else
     60#   undef ZZUF_RLIMIT_MEM
     61#endif
     62
     63#if defined RLIMIT_CPU
     64#   define ZZUF_RLIMIT_CPU RLIMIT_CPU
     65#else
     66#   undef ZZUF_RLIMIT_CPU
     67#endif
    4968
    5069static int run_process(struct opts *, int[][2]);
  • zzuf/trunk/src/zzuf.c

    r4115 r4122  
    5555#endif
    5656#if defined HAVE_SYS_RESOURCE_H
    57 #   include <sys/resource.h>
     57#   include <sys/resource.h> /* for RLIMIT_AS */
    5858#endif
    5959
Note: See TracChangeset for help on using the changeset viewer.