summaryrefslogtreecommitdiff
path: root/code/snippets/rlimits.rb
diff options
context:
space:
mode:
Diffstat (limited to 'code/snippets/rlimits.rb')
-rw-r--r--code/snippets/rlimits.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/code/snippets/rlimits.rb b/code/snippets/rlimits.rb
new file mode 100644
index 0000000..a391c15
--- /dev/null
+++ b/code/snippets/rlimits.rb
@@ -0,0 +1,12 @@
+# The maximum number of simultaneous processes
+# allowed for the current user.
+Process.getrlimit(:NPROC)
+
+# The largest size file that may be created.
+Process.getrlimit(:FSIZE)
+
+# The maximum size of the stack segment of the
+# process.
+Process.getrlimit(:STACK)
+
+