⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 signallistener.java

📁 java信号处理程序
💻 JAVA
字号:
package kh.signal;/**   Copyright 1998 Kevin Hester, kevinh@acm.org      Commerical use prohibited - non commercial distribution is OK.   Contact the author for further information.*/public interface SignalListener    {	/**	   Called when the signal is generated by the operating system.	   @param signalNum a UNIX signal number - ie SIGKILL	*/	public void signalReceived(int signalNum);	/**	   Called to determine if this listener is interested in a particular	   signal number.  Your handler will need to implement this method	   to tell JavaSignals what signals you want to be called for.	   @param signalNum a UNIX signal number - ie SIGKILL	*/	public boolean isInterested(int signalNum);		/**       Signal     Value     Action   Comment       ------------------------------------------------------------------------       SIGHUP        1        A      Hangup detected on controlling terminal                                    or death of controlling process       SIGINT        2        A      Interrupt from keyboard       SIGQUIT       3        A      Quit from keyboard       SIGILL        4        A      Illegal Instruction       SIGABRT       6        C      Abort signal from abort(3)       SIGFPE        8        C      Floating point exception       SIGKILL       9       AEF     Kill signal       SIGSEGV      11        C      Invalid memory reference       SIGPIPE      13        A      Broken pipe: write to pipe with no readers       SIGALRM      14        A      Timer signal from alarm(1)       SIGTERM      15        A      Termination signal       SIGUSR1   30,10,16     A      User-defined signal 1       SIGUSR2   31,12,17     A      User-defined signal 2       SIGCHLD   20,17,18     B      Child stopped or terminated       SIGCONT   19,18,25            Continue if stopped       SIGSTOP   17,19,23    DEF     Stop process       SIGTSTP   18,20,24     D      Stop typed at tty       SIGTTIN   21,21,26     D      tty input for background process       SIGTTOU   22,22,27     D      tty output for background process       Next various other signals.       Signal       Value     Action   Comment       ---------------------------------------------------------------------       SIGTRAP        5         CG     Trace/breakpoint trap       SIGIOT         6         CG     IOT trap. A synonym for SIGABRT       SIGEMT       7,-,7       G       SIGBUS      10,7,10      AG     Bus error       SIGSYS      12,-,12      G      Bad argument to routine (SVID)       SIGSTKFLT    -,16,-      AG     Stack fault on coprocessor       SIGURG      16,23,21     BG     Urgent condition on socket (4.2 BSD)       SIGIO       23,29,22     AG     I/O now possible (4.2 BSD)       SIGPOLL                  AG     A synonym for SIGIO (System V)       SIGCLD       -,-,18      G      A synonym for SIGCHLD       SIGXCPU     24,24,30     AG     CPU time limit exceeded (4.2 BSD)       SIGXFSZ     25,25,31     AG     File size limit exceeded (4.2 BSD)       SIGVTALRM   26,26,28     AG     Virtual alarm clock (4.2 BSD)       SIGPROF     27,27,29     AG     Profile alarm clock       SIGPWR      29,30,19     AG     Power failure (System V)       SIGINFO      29,-,-      G      A synonym for SIGPWR       SIGLOST      -,-,-       AG     File lock lost       SIGWINCH    28,28,20     BG     Window resize signal (4.3 BSD, Sun)       SIGUNUSED    -,31,-      AG     Unused signal		*/	public static final int SIG_MIN = 1;	public static final int SIGHUP = 1;	public static final int SIGINT = 2;	public static final int SIGQUIT = 3;	public static final int SIGILL = 4;	public static final int SIGTRAP = 5;	public static final int SIGFPE = 8;	public static final int SIGKILL = 9;	public static final int SIGTERM = 15;   	public static final int SIG_MAX = 31;    }

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -