view src/lib/restrict-process-size.h @ 8076:bbfbc84f795c HEAD

Added clock_gettime() compatibility function for systems without it.
author Timo Sirainen <tss@iki.fi>
date Thu, 07 Aug 2008 15:05:40 -0400
parents aad49536db41
children
line wrap: on
line source

#ifndef RESTRICT_PROCESS_SIZE_H
#define RESTRICT_PROCESS_SIZE_H

#include <sys/time.h>
#ifdef HAVE_SYS_RESOURCE_H
#  include <sys/resource.h>
#endif

/* Restrict max. process size. The size is in megabytes, setting it to
   (unsigned int)-1 sets it unlimited. */
void restrict_process_size(unsigned int size, unsigned int max_processes);
/* Set fd limit to count. */
void restrict_fd_limit(unsigned int count);

/* Get the core dump size limit. Returns 0 if ok, -1 if lookup failed. */
int restrict_get_core_limit(rlim_t *limit_r);

#endif