Home Backend Development PHP Tutorial Summary of PHP signal management knowledge

Summary of PHP signal management knowledge

May 25, 2018 am 11:40 AM
php Summarize

This article mainly compiles and summarizes relevant information on PHP signal management knowledge. Friends who need it can refer to it

SIGQUIT Create a CORE file to terminate the process and generate a core file
SIGILL Create a CORE file Illegal command
SIGTRAP Create CORE file Tracing trap
SIGBUS Create CORE file Bus error
SIGSEGV Create CORE file Illegal segment error
SIGFPE Create CORE file Floating point exception
SIGIOT Create 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 to the terminal
SIGTTIN Stop process Background process reads the terminal

SIGHUP Terminate the process Terminal line hangs up
SIGINT Terminate the process Interrupt the process
SIGXGPU Terminate the process CPU time limit timeout
SIGXFSZ Terminate the process File length is too long
SIGPROF Terminate the process Use for statistical distribution chart The timer expires
SIGUSR1 Terminate the process User-defined signal 1
SIGUSR2 Terminate the process User-defined signal 2
SIGVTALRM Terminate the process Virtual timer expires
SIGKILL Terminate the process Kill the process
SIGPIPE Terminate the process Write data to a pipe with no reading process
SIGALARM Terminate process When timer expires
SIGTERM Terminate process Software terminate signal

SIGCONT Ignore signal Continue to execute a stopped process
SIGURG Ignore signal I /O emergency signal
SIGIO Ignore the signal I/O can be performed on the descriptor
SIGCHLD Ignore the signal Notify the parent process when the child process stops or exits
SIGWINCH Ignore the signal The window size changes

1 SIGHUP

This signal is issued when the user terminal connection (normal or abnormal) ends, usually when the terminal control process ends, notifying each job in the same session , then they are no longer associated with the control terminal.

2, SIGINT

The program terminates (interrupt, signal, when the user types the INTR character (usually Ctrl-C , is issued when

3. SIGQUIT

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

4, SIGILL

SIGILL executed an illegal instruction. Usually because of the executable file itself An error occurs, or an attempt is made to execute the data segment. This signal may also be generated when the stack overflows.

5, SIGTRAP

SIGTRAP is generated by breakpoint instructions or other trap instructions. Used by the debugger.

6. SIGABRT

SIGABRT is generated when the program finds an error and calls abort.
6. SIGIOT

SIGIOT is generated by the iot command on PDP-11, and is the same as SIGABRT on other machines.

7, SIGBUS

SIGBUS illegal address, including memory address alignment ( alignment, error. eg: Accessing a four-word integer, but its address is not a multiple of 4.

8, SIGFPE

SIGFPE Fatal arithmetic occurred Issued when an operation error occurs. It includes not only floating point operation errors, but also all other arithmetic errors such as overflow and division by 0.

9, SIGKILL

SIGKILL Use to immediately end the running of the program. This signal cannot be blocked, processed or ignored.

10. SIGUSR1

SIGUSR1 is left to the user

11. SIGSEGV

SIGSEGV attempts to access memory that is not allocated to itself, or attempts to write data to a memory address that does not have write permission.

12. SIGUSR2

SIGUSR2 is reserved for users

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 End (terminate, signal, unlike SIGKILL, this signal can be blocked and processed. It is usually used to require the program to exit normally. Shell command

Kill generates this signal by default.

17. SIGCHLD

SIGCHLD When the child process ends, the parent process will receive this signal.

18. SIGCONT

SIGCONT allows a stopped process to continue execution. This signal cannot be blocked. A handler can be used to allow the program to continue execution when it changes from the stopped state to Complete a specific job. For example, redisplay the prompt

19, SIGSTOP

SIGSTOP to stop the execution of the process. Note the difference from terminate and interrupt: The process has not ended, but execution is suspended. This signal cannot be blocked, processed or ignored.

20. SIGTSTP

SIGTSTP stops the running of the process, but this signal can be processed and ignored. This signal is emitted when the user types the SUSP character (usually Ctrl-Z)

21, SIGTTIN

SIGTTIN when the background job is to be started from the user terminal When reading data, all processes in the job will receive the SIGTTIN signal. By default, these processes will stop executing.

22, SIGTTOU

SIGTTOU is similar to SIGTTIN , but received when writing the terminal (or modifying the terminal mode).

23, SIGURG

SIGURG There is "urgent" data or out-of-band data arriving. Produced when socket.

24, SIGXCPU

SIGXCPU exceeds the CPU time resource limit. This limit can be read/changed by getrlimit/setrlimit

25. SIGXFSZ

SIGXFSZ exceeds the file size resource limit.

26. SIGVTALRM

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

27, SIGPROF

SIGPROF is similar to SIGALRM/SIGVTALRM, but includes the CPU time used by the process and System call time.

28. SIGWINCH

SIGWINCH is issued when the window size changes.

29. SIGIO

The SIGIO file descriptor is ready and input/output operations can begin.

30, SIGPWR

SIGPWR Power failure

Yes Two signals can stop a process: SIGTERM and SIGKILL. SIGTERM is more friendly. The process can catch this signal and close the program according to your needs. You can end open log files and complete tasks you are doing before closing the program. In some cases, if the process is working and cannot be interrupted, the process can ignore the SIGTERM signal.

The process cannot ignore the SIGKILL signal. This is a "I don't care what you're doing, stop it now" signal. If you send a SIGKILL signal to a process, Linux stops the process there.

The above is the entire content of this article, I hope it will be helpful to everyone's study.


Related recommendations:

PHP userManagement Commonly used interface call methods

php implementation fileManagementMethods to operate with basic functions

php sessionManagementand control

The above is the detailed content of Summary of PHP signal management knowledge. For more information, please follow other related articles on the PHP Chinese website!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1666
14
PHP Tutorial
1273
29
C# Tutorial
1255
24
PHP: A Key Language for Web Development PHP: A Key Language for Web Development Apr 13, 2025 am 12:08 AM

PHP is a scripting language widely used on the server side, especially suitable for web development. 1.PHP can embed HTML, process HTTP requests and responses, and supports a variety of databases. 2.PHP is used to generate dynamic web content, process form data, access databases, etc., with strong community support and open source resources. 3. PHP is an interpreted language, and the execution process includes lexical analysis, grammatical analysis, compilation and execution. 4.PHP can be combined with MySQL for advanced applications such as user registration systems. 5. When debugging PHP, you can use functions such as error_reporting() and var_dump(). 6. Optimize PHP code to use caching mechanisms, optimize database queries and use built-in functions. 7

PHP and Python: Comparing Two Popular Programming Languages PHP and Python: Comparing Two Popular Programming Languages Apr 14, 2025 am 12:13 AM

PHP and Python each have their own advantages, and choose according to project requirements. 1.PHP is suitable for web development, especially for rapid development and maintenance of websites. 2. Python is suitable for data science, machine learning and artificial intelligence, with concise syntax and suitable for beginners.

PHP vs. Python: Understanding the Differences PHP vs. Python: Understanding the Differences Apr 11, 2025 am 12:15 AM

PHP and Python each have their own advantages, and the choice should be based on project requirements. 1.PHP is suitable for web development, with simple syntax and high execution efficiency. 2. Python is suitable for data science and machine learning, with concise syntax and rich libraries.

PHP in Action: Real-World Examples and Applications PHP in Action: Real-World Examples and Applications Apr 14, 2025 am 12:19 AM

PHP is widely used in e-commerce, content management systems and API development. 1) E-commerce: used for shopping cart function and payment processing. 2) Content management system: used for dynamic content generation and user management. 3) API development: used for RESTful API development and API security. Through performance optimization and best practices, the efficiency and maintainability of PHP applications are improved.

The Enduring Relevance of PHP: Is It Still Alive? The Enduring Relevance of PHP: Is It Still Alive? Apr 14, 2025 am 12:12 AM

PHP is still dynamic and still occupies an important position in the field of modern programming. 1) PHP's simplicity and powerful community support make it widely used in web development; 2) Its flexibility and stability make it outstanding in handling web forms, database operations and file processing; 3) PHP is constantly evolving and optimizing, suitable for beginners and experienced developers.

PHP vs. Other Languages: A Comparison PHP vs. Other Languages: A Comparison Apr 13, 2025 am 12:19 AM

PHP is suitable for web development, especially in rapid development and processing dynamic content, but is not good at data science and enterprise-level applications. Compared with Python, PHP has more advantages in web development, but is not as good as Python in the field of data science; compared with Java, PHP performs worse in enterprise-level applications, but is more flexible in web development; compared with JavaScript, PHP is more concise in back-end development, but is not as good as JavaScript in front-end development.

PHP and Python: Different Paradigms Explained PHP and Python: Different Paradigms Explained Apr 18, 2025 am 12:26 AM

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP and Python: Code Examples and Comparison PHP and Python: Code Examples and Comparison Apr 15, 2025 am 12:07 AM

PHP and Python have their own advantages and disadvantages, and the choice depends on project needs and personal preferences. 1.PHP is suitable for rapid development and maintenance of large-scale web applications. 2. Python dominates the field of data science and machine learning.

See all articles