summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authorDavid Carlier <devnexen@gmail.com>2021-04-10 12:47:16 +0100
committerHiroshi SHIBATA <hsbt@ruby-lang.org>2022-09-21 18:07:59 +0900
commit796069b2882d8a67ecc36bda7c72affcbad09dae (patch)
tree2fc7dbebeef91cef8d41c25b4eabbad5b52e15c8 /process.c
parent02e25db68f94920810c1c110138ab7b1d6e2ca59 (diff)
getrlimit adding RLIMIT_NPTS constant.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/4377
Diffstat (limited to 'process.c')
-rw-r--r--process.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/process.c b/process.c
index cb0a0bc542..dcab3d4da7 100644
--- a/process.c
+++ b/process.c
@@ -8975,6 +8975,14 @@ InitVM_process(void)
*/
rb_define_const(rb_mProcess, "RLIMIT_NPROC", INT2FIX(RLIMIT_NPROC));
#endif
+#ifdef RLIMIT_NPTS
+ /* The maximum number of pseudo-terminals that can be created for the
+ * real user ID of the calling process.
+ *
+ * see the system getrlimit(2) manual for details.
+ */
+ rb_define_const(rb_mProcess, "RLIMIT_NPTS", INT2FIX(RLIMIT_NPTS));
+#endif
#ifdef RLIMIT_RSS
/* Specifies the limit (in pages) of the process's resident set.
*