U:RDoc::AnyMethod[iI" kill:ETI"Process::kill;TT: publico:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"QSends the given signal to the specified process id(s) if _pid_ is positive. ;FI"PIf _pid_ is zero _signal_ is sent to all processes whose group ID is equal ;FI"Qto the group ID of the process. _signal_ may be an integer signal number or ;FI"Qa POSIX signal name (either with or without a +SIG+ prefix). If _signal_ is ;FI"Mnegative (or starts with a minus sign), kills process groups instead of ;FI"@processes. Not all signals are available on all platforms. ;FI"NThe keys and values of +Signal.list+ are known signal names and numbers, ;FI"respectively.;Fo:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"pid = fork do ;TI"2 Signal.trap("HUP") { puts "Ouch!"; exit } ;TI" # ... do some work ... ;TI" end ;TI" # ... ;TI"Process.kill("HUP", pid) ;TI"Process.wait ;T: @format0o; ; [I"produces:;F@o; ; [I" Ouch! ;T; 0o; ; [ I"5If _signal_ is an integer but wrong for signal, ;FI"@Errno::EINVAL or +RangeError+ will be raised. ;FI"HOtherwise unless _signal_ is a +String+ or a +Symbol+, and a known ;FI"1signal name, +ArgumentError+ will be raised.;F@o; ; [ I"HAlso, Errno::ESRCH or +RangeError+ for invalid _pid_, ;FI"DErrno::EPERM when failed because of no privilege, ;FI"Dwill be raised. In these cases, signals may have been sent to ;FI"preceding processes.;F: @fileI"process.c;T:0@omit_headings_from_table_of_contents_below0I"2Process.kill(signal, pid, ...) -> integer ;F0[I" (*args);T@1FI" Process;TcRDoc::NormalModule00