--- !ruby/object:RDoc::RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:RDoc::Markup::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 Ruby's default handler will be invoked. If the command is ``EXIT'', the script will be terminated by the signal. If the command is ``SYSTEM_DEFAULT'', the operating system's default handler will be invoked. 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:RDoc::Markup::Flow::VERB 
  :body: "    Signal.trap(0, proc { puts &quot;Terminating: #{$$}&quot; })\n    Signal.trap(&quot;CLD&quot;)  { puts &quot;Child died&quot; }\n    fork &amp;&amp; Process.wait\n"
- !ruby/struct:RDoc::Markup::Flow::P 
  :body: "produces:"
- !ruby/struct:RDoc::Markup::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, command ) => obj
  Signal.trap( signal ) {| | block } => obj

visibility: public
