| Server IP : 109.234.162.214 / Your IP : 216.73.216.102 Web Server : Apache System : Linux servd162214.srv.odns.fr 4.18.0-372.26.1.lve.1.el8.x86_64 #1 SMP Fri Sep 16 14:08:19 EDT 2022 x86_64 User : carpe ( 1178) PHP Version : 8.0.30 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /opt/alt/ruby18/share/ri/1.8/system/Kernel/ |
Upload File : |
--- !ruby/object:RI::MethodDescription
aliases: []
block_params:
comment:
- !ruby/struct:SM::Flow::P
body: Specifies the handling of signals. The first parameter is a signal name (a string such as ``SIGALRM'', ``SIGUSR1'', and so on) or a signal number. The characters ``SIG'' may be omitted from the signal name. The command or block specifies code to be run when the signal is raised. If the command is the string ``IGNORE'' or ``SIG_IGN'', the signal will be ignored. If the command is ``DEFAULT'' or ``SIG_DFL'', the operating system's default handler will be invoked. If the command is ``EXIT'', the script will be terminated by the signal. Otherwise, the given command or block will be run. The special signal name ``EXIT'' or signal number zero will be invoked just prior to program termination. trap returns the previous handler for the given signal.
- !ruby/struct:SM::Flow::VERB
body: " Signal.trap(0, proc { puts "Terminating: #{$$}" })\n Signal.trap("CLD") { puts "Child died" }\n fork && Process.wait\n"
- !ruby/struct:SM::Flow::P
body: "produces:"
- !ruby/struct:SM::Flow::VERB
body: " Terminating: 27461\n Child died\n Terminating: 27460\n"
full_name: Kernel#trap
is_singleton: false
name: trap
params: |
Signal.trap( signal, proc ) => obj
Signal.trap( signal ) {| | block } => obj
visibility: public