restrict-process-size.c revision ff9e95151c21d0dbad35d4d96205a56897b96e34
/* Copyright (c) 2002-2003 Timo Sirainen */
#include "lib.h"
#include "restrict-process-size.h"
#include <unistd.h>
#ifdef HAVE_SYS_RESOURCE_H
# include <sys/resource.h>
#endif
unsigned int max_processes __attr_unused__)
{
#ifdef HAVE_SETRLIMIT
#ifdef HAVE_RLIMIT_NPROC
if (max_processes < INT_MAX) {
}
#endif
#ifdef HAVE_RLIMIT_AS
#endif
}
#else
if (size != 0) {
i_warning("Can't restrict process size: "
"setrlimit() not supported by system. "
"Set the limit to 0 to hide this warning.");
}
#endif
}
void restrict_fd_limit(unsigned int count)
{
#ifdef HAVE_SETRLIMIT
#endif
}
bool restrict_raise_fd_limit(unsigned int count)
{
#ifdef HAVE_SETRLIMIT
return FALSE;
return TRUE;
return TRUE;
/* raise as high as we can */
}
#endif
return FALSE;
}