English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية

Summary of PHP Signal Management Knowledge

SIGQUIT    Establishing CORE file and terminating the process, generating a core file
SIGILL     Establishing CORE file        Illegal instruction
SIGTRAP    Establishing CORE file        Trace trap
SIGBUS     Establishing CORE file        Bus error
SIGSEGV    Establishing CORE file        Segment illegal error
SIGFPE     Establishing CORE file        Floating-point exception
SIGIOT     Establishing CORE file        Execute I/O trap

SIGSTOP Stop process Stop signal from non-terminal
SIGTSTP Stop process Stop signal from terminal
SIGTTOU Stop process Background process writes terminal
SIGTTIN Stop process Background process reads terminal

SIGHUP Terminate process Terminal line disconnected
SIGINT Terminate process Interrupt process
SIGXGPU Terminate process CPU time limit exceeded
SIGXFSZ Terminate process File length too long
SIGPROF Terminate process Timer reaches for statistical distribution graph
SIGUSR1    Terminate process  User-defined signal1
SIGUSR2    Terminate process User-defined signal2
SIGVTALRM Terminate process Virtual timer reaches
SIGKILL Terminate process Kill process
SIGPIPE Terminate process Write data to a pipe without a read process
SIGALARM Terminate process Timer reaches
SIGTERM Terminate process Software termination signal

SIGCONT Ignore signal Continue executing a stopped process
SIGURG Ignore signal I/O emergency signal
SIGIO Ignore signal It is possible to perform I on the descriptor/O
SIGCHLD Ignore signal Notify the parent process when a child process stops or exits
SIGWINCH Ignore signal Window size changes

1 SIGHUP

This signal is emitted when the user terminal connection (normal or abnormal, ends, usually at the end of the terminal control process, to notify each job within the same session, at this time they are no longer associated with the control terminal.

2、SIGINT

Program termination (interrupt, signal, when the user enters the INTR character (usually Ctrl-C、when emitted

3、SIGQUIT

SIGQUIT is similar to SIGINT, but is generated by the QUIT character (usually Ctrl-、to control. When a process exits due to receiving SIGQUIT, a core file is produced, which is similar in this sense to a program error signal.

4、SIGILL

SIGILL executes an illegal instruction. This is usually due to an error in the executable file itself, or attempting to execute a data segment. This signal may also be generated when a stack overflow occurs.

5、SIGTRAP

SIGTRAP is generated by breakpoint instructions or other trap instructions. It is used by debuggers.

6、SIGABRT

SIGABRT Generated when a program detects an error and calls abort.
6、SIGIOT

SIGIOT In PDP-11Generated by the iot instruction on this machine, and the same as SIGABRT on other machines.

7、SIGBUS

SIGBUS Illegal address, including memory alignment (alignment) errors. For example: accessing a four-byte integer but its address is not4Multiples.

8、SIGFPE

SIGFPE Issued when a fatal arithmetic operation error occurs. It includes not only floating-point operation errors but also overflow, division by zero, and other arithmetic errors.

9、SIGKILL

SIGKILL Used to immediately terminate the execution of the program. This signal cannot be blocked, handled, or ignored.

10、SIGUSR1

SIGUSR1 Reserved for user use

11、SIGSEGV

SIGSEGV Attempts to access memory not allocated to it, or attempts to write data to a memory address without write permission.

12、SIGUSR2

SIGUSR2 Reserved for user use

13、SIGPIPE

Broken pipe

14、SIGALRM

SIGALRM Clock timing signal, which calculates the actual time or clock time. The alarm function uses this signal.

15、SIGTERM

SIGTERM Program termination (terminate) signal, different from SIGKILL as this signal can be blocked and handled. It is usually used to request the program to exit normally. Shell command

kill By default, it generates this signal.

17、SIGCHLD

SIGCHLD The parent process receives this signal when a child process ends.

18、SIGCONT

SIGCONT Allows a stopped (stopped) process to continue execution. This signal cannot be blocked. A handler can be used to perform specific tasks when the program changes from stopped to continue execution. For example, re-displaying the prompt

19、SIGSTOP

SIGSTOP Stops the execution (stopped) of the process. Note the difference from terminate and interrupt: The process has not ended, but has been paused. This signal cannot be blocked, handled, or ignored.

20、SIGTSTP

SIGTSTP Stops the execution of the process, but this signal can be handled and ignored. When the user presses the SUSP character (usually Ctrl-Z、Generate this signal

21、SIGTTIN

SIGTTIN When the background job needs to read data from the user terminal, all processes in the job will receive the SIGTTIN signal. By default, these processes will stop executing.

22、SIGTTOU

SIGTTOU Similar to SIGTTIN, but received on the write terminal (or modify terminal mode) when.

23, SIGURG

SIGURG Has 'urgent' data or out-Of-Band data arrives at socket.

24, SIGXCPU

SIGXCPU Exceeding CPU time resource limit. This limit can be obtained by getrlimit/Read with setrlimit/ Change

25, SIGXFSZ

SIGXFSZ Exceeding file size resource limit.

26, SIGVTALRM

SIGVTALRM Virtual clock signal. Similar to SIGALRM, but it calculates the CPU time occupied by the process.

27, SIGPROF

SIGPROF Similar to SIGALRM/SIGVTALRM, but including the CPU time used by the process and the time of system calls.

28, SIGWINCH

SIGWINCH Issued when the window size changes.

29, SIGIO

SIGIO File descriptor ready, ready to start input./Output operation.

30, SIGPWR

SIGPWR Power failure

There are two signals that can stop a process: SIGTERM and SIGKILL. SIGTERM is more friendly, and the process can catch this signal to close the program according to your needs. Before closing the program, you can end the open log files and complete the tasks you are doing. In some cases, if the process is performing a job and cannot be interrupted, the process can ignore this SIGTERM signal.

For the SIGKILL signal, the process cannot be ignored. This is a signal that says 'I don't care what you are doing, stop immediately'. If you send a SIGKILL signal to a process, Linux will stop the process there.

Statement: The content of this article is from the Internet, and the copyright is owned by the original author. The content is contributed and uploaded by Internet users spontaneously. This website does not own the copyright, has not been manually edited, and does not assume any relevant legal liability. If you find any content suspected of copyright infringement, please send an email to: notice#oldtoolbag.com (Please replace # with @ when sending an email for reporting. Provide relevant evidence, and once verified, this site will immediately delete the content suspected of infringement.)