doc/wait3.txt in proc-wait3-1.5.1 vs doc/wait3.txt in proc-wait3-1.5.2

- old
+ new

@@ -1,8 +1,9 @@ == Description Adds the wait3, wait4, waitid, pause, sigsend, and getrusage methods to - the Process module. + the Process module. For Ruby 1.8.4 or earlier, it also adds the getrlimit + and setrlimit methods. == Synopsis require "proc/wait3" pid = fork{ sleep 1; exit 2 } @@ -69,11 +70,24 @@ Returns a Proc::SigInfo struct and sets $?. Not supported on all platforms. +== Ruby 1.8.4 or earlier. +Process.getrlimit(resource) => [cur_limit, max_limit] + Returns a two element array consisting of the hard and soft limit + for the current process for the given +resource+. The array consists of + either numeric values or the word "infinite". + +Process.setrlimit(resource, current, max=nil) => nil + Sets the resource limit for +resource+ to +current+ for the soft limit and + +max+ for the hard limit, or to +current+ if +max+ is nil. + == Constants +=== Standard +Process::WAIT3_VERSION + Returns the version of this package as a string. === Process type constants ==== All platforms Process::P_ALL All non-system process. @@ -121,18 +135,53 @@ Process::WTRAPPED Wait for traced process(es) to become trapped or reach a breakpoint. Not supported on all platforms. + +=== RLIMIT constants +Process::RLIMIT_AS + A synonym for RLIMIT_VMEM + +Process::RLIMIT_CORE + The maximum size of a core file, in bytes, that may be created. + +Process::RLIMIT_CPU + The maximum amount of CPU time, in seconds, the process is allowed to use. + +Process::RLIMIT_DATA + The maximum size of the process' heap size, in bytes. + +Process::RLIMIT_FSIZE + The maximum size of a file, in bytes, that the process may create. + +Process::RLIMIT_NOFILE + The maximum value that the kernel may assign to a file descriptor, + effectively limiting the number of open files for the calling process. + +Process::RLIMIT_STACK + The maximum size of the process' stack in bytes. + +Process::RLIMIT_VMEM + The maximum size of the process' mapped address space. + +Process::RLIM_INFINITY + A infinite limit. + +Process::RLIM_SAVED_CUR + Current soft limit. + +Process::RLIM_SAVED_MAX + Current hard limit. == Notes - The wait3 and wait4 methods are similar to the wait2() and waitpid2() + The wait3 and wait4 methods are similar to the wait2 and waitpid2 methods, except that they return much more information via the rusage struct. == Known Bugs - None that I'm aware of. Please log any bugs on the SourceForge project - page at http://ruby-miscutils.sf.net. + None that I'm aware of. Please log any bugs on the RubyForge project + page at http://www.rubyforge.org/projects/shards. == License Ruby's == Copyright