D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
Process
/
Filename :
setrlimit-c.ri
back
Copy
U:RDoc::AnyMethod[iI"setrlimit:ETI"Process::setrlimit;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"BSets limits for the current process for the given +resource+ ;TI"?to +cur_limit+ (soft limit) and +max_limit+ (hard limit); ;TI"returns +nil+.;To:RDoc::Markup::BlankLine o; ; [ I"LArgument +resource+ specifies the resource whose limits are to be set; ;TI"Jthe argument may be given as a symbol, as a string, or as a constant ;TI".beginning with <tt>Process::RLIMIT_</tt> ;TI"G(e.g., +:CORE+, <tt>'CORE'</tt>, or <tt>Process::RLIMIT_CORE</tt>.;T@o; ; [I"AThe resources available and supported are system-dependent, ;TI"1and may include (here expressed as symbols):;T@o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o; ; [I"`+:AS+: Total available memory (bytes) (SUSv3, NetBSD, FreeBSD, OpenBSD except 4.4BSD-Lite).;To;;0; [o; ; [I"(+:CORE+: Core size (bytes) (SUSv3).;To;;0; [o; ; [I"(+:CPU+: CPU time (seconds) (SUSv3).;To;;0; [o; ; [I"++:DATA+: Data segment (bytes) (SUSv3).;To;;0; [o; ; [I")+:FSIZE+: File size (bytes) (SUSv3).;To;;0; [o; ; [I"E+:MEMLOCK+: Total size for mlock(2) (bytes) (4.4BSD, GNU/Linux).;To;;0; [o; ; [I"J+:MSGQUEUE+: Allocation for POSIX message queues (bytes) (GNU/Linux).;To;;0; [o; ; [I"F+:NICE+: Ceiling on process's nice(2) value (number) (GNU/Linux).;To;;0; [o; ; [I"2+:NOFILE+: File descriptors (number) (SUSv3).;To;;0; [o; ; [I"M+:NPROC+: Number of processes for the user (number) (4.4BSD, GNU/Linux).;To;;0; [o; ; [I"<+:NPTS+: Number of pseudo terminals (number) (FreeBSD).;To;;0; [o; ; [I">+:RSS+: Resident memory size (bytes) (4.2BSD, GNU/Linux).;To;;0; [o; ; [I"Q+:RTPRIO+: Ceiling on the process's real-time priority (number) (GNU/Linux).;To;;0; [o; ; [I"@+:RTTIME+: CPU time for real-time process (us) (GNU/Linux).;To;;0; [o; ; [I"=+:SBSIZE+: All socket buffers (bytes) (NetBSD, FreeBSD).;To;;0; [o; ; [I"K+:SIGPENDING+: Number of queued signals allowed (signals) (GNU/Linux).;To;;0; [o; ; [I"*+:STACK+: Stack size (bytes) (SUSv3).;T@o; ; [I"2Arguments +cur_limit+ and +max_limit+ may be:;T@o;; ;;[ o;;0; [o; ; [I"CIntegers (+max_limit+ should not be smaller than +cur_limit+).;To;;0; [o; ; [I"7Symbol +:SAVED_MAX+, string <tt>'SAVED_MAX'</tt>, ;TI"Gor constant <tt>Process::RLIM_SAVED_MAX</tt>: saved maximum limit.;To;;0; [o; ; [I"7Symbol +:SAVED_CUR+, string <tt>'SAVED_CUR'</tt>, ;TI"Gor constant <tt>Process::RLIM_SAVED_CUR</tt>: saved current limit.;To;;0; [o; ; [I"5Symbol +:INFINITY+, string <tt>'INFINITY'</tt>, ;TI"Gor constant <tt>Process::RLIM_INFINITY</tt>: no limit on resource.;T@o; ; [I"8This example raises the soft limit of core size to ;TI"6the hard limit to try to make core dump possible:;T@o:RDoc::Markup::Verbatim; [I";Process.setrlimit(:CORE, Process.getrlimit(:CORE)[1]) ;T:@format0o; ; [I"$Not available on all platforms.;T: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"JProcess.setrlimit(resource, cur_limit, max_limit = cur_limit) -> nil ;T0[ I"(*args);T@�FI"Process;TcRDoc::NormalModule00