Issue #16595: Add prlimit() to resource module

prlimit() is a Linux specific command that combines setrlimit, getrlimit and can set the limit
of other processes.
This commit is contained in:
Christian Heimes 2013-10-22 11:21:54 +02:00
parent 6fc79bf813
commit b7bd5df809
8 changed files with 169 additions and 26 deletions

View file

@ -2927,6 +2927,16 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
])
AC_MSG_CHECKING(for prlimit)
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[
#include <sys/time.h>
#include <sys/resource.h>
]], [[void *x=prlimit]])],
[AC_DEFINE(HAVE_PRLIMIT, 1, Define if you have the 'prlimit' functions.)
AC_MSG_RESULT(yes)],
[AC_MSG_RESULT(no)
])
# On some systems (eg. FreeBSD 5), we would find a definition of the
# functions ctermid_r, setgroups in the library, but no prototype
# (e.g. because we use _XOPEN_SOURCE). See whether we can take their