mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
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:
parent
6fc79bf813
commit
b7bd5df809
8 changed files with 169 additions and 26 deletions
10
configure.ac
10
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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue