The Dameon process is also called the Daemon, in general he has the following 2 characteristics :1. The life cycle is very long, once started, generally will not terminate, until the system is launched, but the Dameon process can be stopped or send a signal to kill it 2. In the background, not with any control terminal, terminal signal such as: SIGINT,SIGQUIT,SIGTSTP, And shutting down the terminal will not affect Deamon
How to write the daemon proce
return Sig_err
Signal examples are as follows:
#include
Typically, a user process needs to handle multiple signals. You can register multiple signal processing functions in one program. A signal can correspond to a processing function, while multiple signals can correspond to a handler function.
For SIGINT signals we can use CTRL + C or ctrl+z to interrupt the process to perform SIGINT registered fun
Deploy War packages for Linux tomcat, deploy JavaWeb projects for Linux Tomcat, deploy War packages for Linux, and deploy tomcatjavaweb
Deploy the War package for Linux tomcat, deploy the JavaWeb project for Linux Tomcat, and deploy the War package for
Create a small Linux with network functions
First, copy the required basic network commands to a Linux instance.Copy Ping and ifconfigTo add a network function, you must be driven by the NIC. The NIC Driver is pcnet32.However, pcnet32 has a dependency module that is MII, and MII has no dependency module,So we only need to copy the two modules to ourIn Linux, chec
Signal is an important concept in Linux. In the early days, Linux used the system to call signal to install signals.
# Include Void (* signal (int signum, void (* Handler) (INT );This function has two parameters: SIGNUM specifies the signal to be installed, and handler specifies the signal processing function.The return value of this function is a function pointer pointing to the handler installed last ti
People who are familiar with Linux's 20 most commonly used commands will know that there are indeed many commands in Linux, however, users who have ever played Linux have never been troubled by so many Linux commands, because we only need to master the most commonly used commands. Of course, you can also make... people who are familiar with Linux's 20 most common
signal to be processed.
2> ignore a signal and do not process it.
3> the default value of the system is retained for processing the signal. For this default operation, the default operation for most signals is to terminate the process. A process calls signal to specify the process's processing behavior for a signal.
Below is the window signal list
Linux also uses the kill-l command:
1) SIGHUP 2) SIGINT
Never use Linux commands! | Linux China, linux ChinaYou only need a stupid move. You can even destroy a company worth billions of dollars, Just Like Apache Struts without patching. -- Steven Vaughan-Nicolas
In this article, navigate to rm-rf/11% faster fork bomb 39% faster junk data rewrite hard disk 47% faster erase hard disk! 54% Bytes/dev/null loss 63% bytes f
variables, buffers, and so on.(3) When the parent process learns that the child process is terminated, it is the responsibility to use the wait system call for the child process. This wait function takes out the exit information of the child process from the kernel and empties the space occupied by the information in kernel.8.Linux Signal Basics(1) compared to other inter-process communication methods (interprocess communication, such as pipe, shared
SIGWINCH/* Window size changes * *
When the process adjusts the line or column of the terminal (such as increasing the size of your xterm), the sigwinch signal is sent to the process. The default behavior is to discard the signal.
#define SIGUSR1/* User Defined signal 1 * *
#define SIGUSR2/* User Defined Signal 2 * *
SIGUSR1 and SIGUSR2 These two signals are designed to be specified by the user. They can be set up to do whatever you need. In other words, the operating system does not have a
is, if you need to do other operations with the shell, but you do not want to shut down VI, because you have toTo save the launch, you can simply press Ctrl+z,shell will suspend the VI process ~, when you end the shell operation, you can use the FG command to continue vi your file.CTRL + C forcibly interrupts the execution of the current program.Ctrl+d indicates the end of the current input (that is, the user no longer issues instructions to the current program), then
, to customize the processing SIGINT (press CTRL-c The signal is sent when the process is terminated) #include#include#include#defineSig2catch 2voidHandlerintSignum) {if(Signum = =Sig2catch) {printf ("wanna kill me with ctrl-c?! No way\n");}} intMain () {printf ("app start ... \ n"); Signal (Sig2catch, handler); while(1) {Sleep (1);} printf ("app end ... \ n"); return 0;} Run the program and try to use CTRL-C After the program is terminated, the
"Copyright Notice: respect for the original, reproduced please retain the source: blog.csdn.net/shallnet or .../gentleliu, the article is for learning communication only, do not use for commercial purposes" the signal is similar to an interrupt request, and a process does not block waiting for a signal to arrive at some point, Also do not know when the signal will come, the signal generation is random, the process only need to register signal processing function, when the signal arrives to execu
[Reprinted] Linux Startup Process details-Section 8 of "do not worry about Linux programming" and linux Startup Process details
This original article belongs to the "Linux greenhouse" blog, blog address for http://roclinux.cn. The author of this article is rocrocket.To prevent negative reprinting on some websites, we r
in this series, the author outlines several main means of inter-process communication between Linux. Pipelines and well-known pipelines are among the earliest inter-process communication mechanisms, pipelines can be used for communication between affinity processes, and well-known pipelines overcome the limitations of pipe without name, so that, in addition to having the functionality of a pipeline, it allows for inter-process communication without af
People who have played Linux will know that there are really a lot of commands in Linux, but people who have played Linux have never bothered by the fact that Linux commands are so many, because we only need to master the commands we use most often. Of course you can also use to find the man, he will help you solve a l
people who have played Linux will know that there are really a lot of commands in Linux, but people who have played Linux have never bothered by the fact that Linux commands are so many, because we only need to master the commands we use most often. Of course you can also use to find the man, he will help you solve a l
Compile the linux0.00 kernel (full Linux Kernel Analysis-based on the 0.12 kernel)
I have bought a fully-analyzed Linux kernel written by Zhao Ke-based on the 0.12 kernel. It seems that the principles of the first four chapters have never had the courage to practice them by myself. Recently, I have made up my mind to take a good look at this book, and I plan to write some study notes to record some gains an
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.