Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Example Analysis of signal Management knowledge in PHP

2025-02-25 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/03 Report--

This article shares with you the content of an example analysis of signal management knowledge in PHP. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

SIGQUIT sets up a CORE file to terminate the process, and generates a core file

Illegal instruction for SIGILL to establish CORE file

SIGTRAP sets up CORE file tracking traps

SIGBUS error establishing CORE file bus

Illegal error creating CORE file segment in SIGSEGV

SIGFPE creates floating point exception in CORE file

SIGIOT establishes the CORE file and executes Irambo self-trapping.

SIGSTOP stop process stop signal from non-terminal

Stop signal from SIGTSTP stop process terminal

SIGTTOU stop process background process write terminal

SIGTTIN stop process background process read terminal

SIGHUP terminating process terminal line hangs up

SIGINT terminates process interrupts process

SIGXGPU terminates the process CPU timeout

SIGXFSZ termination process file length is too long

The statistical distribution map of SIGPROF termination process arrives with timer.

SIGUSR1 terminates the process user-defined signal 1

SIGUSR2 terminates the process user-defined signal 2

SIGVTALRM terminates the process when the virtual timer arrives

SIGKILL terminates the process and kills the process

SIGPIPE terminates the process to write data to a pipe that does not read the process.

When the SIGALARM termination process timer arrives

SIGTERM termination process software termination signal

SIGCONT ignores the signal to continue with a stopped process

SIGURG ignores the signal I am O emergency signal

SIGIO ignores that the signal descriptor can be used to perform Icano.

SIGCHLD ignores the signal to notify the parent process when the child process stops or exits

SIGWINCH ignores the change in signal window size

1 SIGHUP

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

2 、 SIGINT

Program termination (interrupt, signal, issued when the user types INTR characters (usually Ctrl-C,

3 、 SIGQUIT

SIGQUIT is similar to SIGINT, but is controlled by QUIT characters (usually Ctrl-,. The process generates a core file when it receives a SIGQUIT exit, which is similar to a program error signal in this sense.

4 、 SIGILL

SIGILL executed illegal instructions. It is usually due to an error in the executable itself or an attempt to execute a data segment. This signal may also be generated when the stack is overflowed.

5 、 SIGTRAP

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

6 、 SIGABRT

It occurs when the SIGABRT program discovers the error and calls abort.

6 、 SIGIOT

SIGIOT is generated by the iot instruction on PDP-11, just like SIGABRT on other machines.

7 、 SIGBUS

Illegal SIGBUS address, including memory address alignment (alignment, error. Eg: accesses a four-word integer, but its address is not a multiple of 4.

8 、 SIGFPE

SIGFPE is issued when a fatal arithmetic error occurs. It includes not only floating-point arithmetic errors, but also all other arithmetic errors such as overflow and divisor 0.

9 、 SIGKILL

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

10 、 SIGUSR1

SIGUSR1 is left to users.

11 、 SIGSEGV

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

12 、 SIGUSR2

SIGUSR2 is left to 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 ends (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

When the SIGCHLD child process ends, the parent process receives this signal.

18 、 SIGCONT

SIGCONT allows a stop (stopped,) process to continue execution. This signal cannot be blocked. You can use a handler to get a program to do specific work when it changes from stopped state to continue execution. For example, redisplay the prompt

19 、 SIGSTOP

SIGSTOP stops (stopped, the execution of the process. Note the difference between it and terminate and interrupt: the process is not finished, it is just paused. This signal cannot be blocked, processed or ignored.

20 、 SIGTSTP

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

21 、 SIGTTIN

SIGTTIN when a background job reads data from a user terminal, all processes in the job receive a SIGTTIN signal. By default, these processes stop execution.

22 、 SIGTTOU

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

23 、 SIGURG

SIGURG has "urgent" data or out-of-band data that is generated when it arrives at socket.

24 、 SIGXCPU

SIGXCPU exceeds 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 consumed by the process.

27 、 SIGPROF

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

28 、 SIGWINCH

Issued when the size of the SIGWINCH window changes.

29 、 SIGIO

The SIGIO file descriptor is ready to start input / output operations.

30 、 SIGPWR

SIGPWR Power failure

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

For SIGKILL signals, the process cannot be ignored. This is a signal that "I don't care what you're doing, stop right now". If you send a SIGKILL signal to the process, Linux stops the process there.

Thank you for reading! This is the end of this article on "sample Analysis of signal Management knowledge in PHP". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report