summaryrefslogtreecommitdiffstats
path: root/configure.ac
diff options
context:
space:
mode:
authorChristian Heimes <christian@cheimes.de>2013-10-22 09:21:54 (GMT)
committerChristian Heimes <christian@cheimes.de>2013-10-22 09:21:54 (GMT)
commitb7bd5df809aabaf857eb51b139d5e519d8b3c364 (patch)
treed4fb23b4eca52906c84473365a6a0e44c792a7e4 /configure.ac
parent6fc79bf813de21015208d989e38cdc95bda03292 (diff)
downloadcpython-b7bd5df809aabaf857eb51b139d5e519d8b3c364.zip
cpython-b7bd5df809aabaf857eb51b139d5e519d8b3c364.tar.gz
cpython-b7bd5df809aabaf857eb51b139d5e519d8b3c364.tar.bz2
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.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index e1d3e77..d814581 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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