< prev index next >

src/java.base/share/classes/sun/misc/Signal.java

Print this page

        

*** 48,58 **** * </ul> * <p> * Signal objects are created based on their names. For example: * <blockquote><pre> * new Signal("INT"); ! * </blockquote></pre> * constructs a signal object corresponding to <code>SIGINT</code>, which is * typically produced when the user presses <code>Ctrl-C</code> at the command line. * The <code>Signal</code> constructor throws <code>IllegalArgumentException</code> * when it is passed an unknown signal. * <p> --- 48,58 ---- * </ul> * <p> * Signal objects are created based on their names. For example: * <blockquote><pre> * new Signal("INT"); ! * </pre></blockquote> * constructs a signal object corresponding to <code>SIGINT</code>, which is * typically produced when the user presses <code>Ctrl-C</code> at the command line. * The <code>Signal</code> constructor throws <code>IllegalArgumentException</code> * when it is passed an unknown signal. * <p>
*** 62,72 **** * public void handle(Signal sig) { * ... // handle SIGINT * } * }; * Signal.handle(new Signal("INT"), handler); ! * </blockquote></pre> * * @author Sheng Liang * @author Bill Shannon * @see sun.misc.SignalHandler * @since 1.2 --- 62,72 ---- * public void handle(Signal sig) { * ... // handle SIGINT * } * }; * Signal.handle(new Signal("INT"), handler); ! * </pre></blockquote> * * @author Sheng Liang * @author Bill Shannon * @see sun.misc.SignalHandler * @since 1.2
*** 147,157 **** /** * Registers a signal handler. * * @param sig a signal * @param handler the handler to be registered with the given signal. ! * @result the old handler * @exception IllegalArgumentException the signal is in use by the VM * @see sun.misc.Signal#raise(Signal sig) * @see sun.misc.SignalHandler * @see sun.misc.SignalHandler#SIG_DFL * @see sun.misc.SignalHandler#SIG_IGN --- 147,157 ---- /** * Registers a signal handler. * * @param sig a signal * @param handler the handler to be registered with the given signal. ! * @return the old handler * @exception IllegalArgumentException the signal is in use by the VM * @see sun.misc.Signal#raise(Signal sig) * @see sun.misc.SignalHandler * @see sun.misc.SignalHandler#SIG_DFL * @see sun.misc.SignalHandler#SIG_IGN
< prev index next >