restrict-process-size.c revision 726b298c52be6cd11fd6dd3aa3b981fec2562cf8
/* Copyright (c) 2002-2008 Dovecot authors, see the included COPYING file */
#include "lib.h"
#include "restrict-process-size.h"
#include <unistd.h>
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
}
{
#ifdef HAVE_RLIMIT_CORE
i_error("getrlimit(RLIMIT_CORE) failed: %m");
return -1;
}
return 0;
#else
return -1;
#endif
}