%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /opt/cpanel/ea-ruby24/root/usr/share/ri/system/Signal/
Upload File :
Create Path :
Current File : //opt/cpanel/ea-ruby24/root/usr/share/ri/system/Signal/cdesc-Signal.ri

U:RDoc::NormalModule[iI"Signal:ET@0o:RDoc::Markup::Document:@parts[o;;[o:RDoc::Markup::Paragraph;[
I"@Many operating systems allow signals to be sent to running ;TI"Iprocesses. Some signals have a defined effect on the process, while ;TI"Aothers may be trapped at the code level and acted upon. For ;TI"Iexample, your process may trap the USR1 signal and use it to toggle ;TI"Cdebugging, and may use TERM to initiate a controlled shutdown.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim;[I"pid = fork do
;TI"  Signal.trap("USR1") do
;TI"    $debug = !$debug
;TI"#    puts "Debug now: #$debug"
;TI"  end
;TI"  Signal.trap("TERM") do
;TI"    puts "Terminating..."
;TI"    shutdown()
;TI"  end
;TI""  # . . . do some work . . .
;TI"	end
;TI"
;TI"Process.detach(pid)
;TI"
;TI"# Controlling program:
;TI"Process.kill("USR1", pid)
;TI"# ...
;TI"Process.kill("USR1", pid)
;TI"# ...
;TI"Process.kill("TERM", pid)
;T:@format0o;	;[I"produces:;To;;[I" Debug now: true
;TI" Debug now: false
;TI"Terminating...
;T;0o;	;[I"DThe list of available signal names and their interpretation is ;TI"Gsystem dependent. Signal delivery semantics may also vary between ;TI"Gsystems; in particular signal delivery may not always be reliable.;T:
@fileI"
signal.c;T:0@omit_headings_from_table_of_contents_below0;
0;0[[[[[I"
class;T[[:public[[I"	list;TI"
signal.c;T[I"signame;T@C[I"	trap;T@C[:protected[[:private[[I"
instance;T[[;[[;[[;[[[U:RDoc::Context::Section[i0o;;[;
0;0[@7@7cRDoc::TopLevel

Zerion Mini Shell 1.0