fix trap's doc.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12556 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
akr 2007-06-15 14:33:59 +00:00
parent afa74d6cae
commit 8092d0bd87

View File

@ -851,21 +851,22 @@ rb_trap_restore_mask(void)
/* /*
* call-seq: * call-seq:
* Signal.trap( signal, proc ) => obj * Signal.trap( signal, command ) => obj
* Signal.trap( signal ) {| | block } => obj * Signal.trap( signal ) {| | block } => obj
* *
* Specifies the handling of signals. The first parameter is a signal * Specifies the handling of signals. The first parameter is a signal
* name (a string such as ``SIGALRM'', ``SIGUSR1'', and so on) or a * name (a string such as ``SIGALRM'', ``SIGUSR1'', and so on) or a
* signal number. The characters ``SIG'' may be omitted from the * signal number. The characters ``SIG'' may be omitted from the
* signal name. The command or block specifies code to be run when 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 * signal is raised.
* ``SIG_IGN'', the signal will be ignored. If the command is * If the command is the string ``IGNORE'' or ``SIG_IGN'', the signal
* ``DEFAULT'' or ``SIG_DFL'', the Ruby's default handler * will be ignored.
* will be invoked. If the command is ``EXIT'', the script will be * If the command is ``DEFAULT'' or ``SIG_DFL'', the Ruby's default handler
* terminated by the signal. Otherwise, the given command or block * will be invoked.
* will be run. * If the command is ``EXIT'', the script will be terminated by the signal.
* If the command is ``SYSTEM_DEFAULT'', the operating system's default * If the command is ``SYSTEM_DEFAULT'', the operating system's default
* handler will be invoked. * handler will be invoked.
* Otherwise, the given command or block will be run.
* The special signal name ``EXIT'' or signal number zero will be * The special signal name ``EXIT'' or signal number zero will be
* invoked just prior to program termination. * invoked just prior to program termination.
* trap returns the previous handler for the given signal. * trap returns the previous handler for the given signal.