| Server IP : 162.214.74.102 / Your IP : 216.73.217.21 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /proc/self/root/opt/cpanel/ea-ruby24/root/usr/share/ri/system/Process/ |
Upload File : |
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::BlankLine o: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"<em>produces:</em>;F@o;; [I"Ouch!
;T;
0o;
; [ I"5If _signal_ is an integer but wrong for signal, ;FI"@<code>Errno::EINVAL</code> 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, <code>Errno::ESRCH</code> or +RangeError+ for invalid _pid_, ;FI"D<code>Errno::EPERM</code> 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