This document is a translation of section 1.1 of the IBM Redbook Linux Performanceand Tuning guidelines.Original address:http://www.redbooks.ibm.com/redpapers/pdfs/redp4285.pdfOriginal Eduardo Ciliendo, Takechika Kunimasa, Byron BraswellThe translation is as follows:1.1 Linux Process ManagementProcess management is one of the most important functions of the operating system. Efficient process management can
We already know that we can terminate the process by signal, or through the signal to communicate between processes, the program can also specify the signal's associated processing function to change the signal's default processing mode, you can also block some signals, so that it cannot be passed to the process. So how do we set the signal we need to deal with, and what signals do we need to deal with? The signal set function is to help us solve these problems.For more information about using s
transferred from : http://blog.chinaunix.net/uid-20680966-id-4698387.htmlThe purpose is to let the program's printf print can be redirected to a text, CTRL + C Force exit after viewing the text, convenient debugging.Operating mode:A. The out-of-process function prints some charactersA.out12>1The stdout and stderr are redirected to the 1.txt file, the results found that the operation of 1.txt has been empty, debugging found if the A.out normal end exit 1.txt data is normal,CTRL + C Force quit the
Introduction to Linux environment variables
Environment variables: The bash shell uses an attribute called "Environment variable (environment variables)" To store information about the shell session and the working environment, which allows you to store data in memory to run program and script access on the shell, This data can be used to identify users, accounts, systems, shell features, and any other data that you need to store.
The environment va
returns to the user state (this situation appears more).
The signal will not necessarily be processed immediately, the operating system will not be able to process a signal to suspend the currently running process (switch process), suspend (process switching) is too much consumption, if not an emergency signal, will not be immediately processed. The operating system chooses to process the signal when the kernel state is switched back to the user state, so that it can be handled by switching b
user ). All programs running on this terminal, including foreground and background process groups, generally belong to this Session. When you log out of Linux, processes in the frontend process group and in the background that are output to the terminal will receive a SIGHUP signal. The default operation of this signal is to terminate the process. Therefore, the processes in the foreground process group and the background that have terminal output wi
Linux system programming (23)-signal blocking, linux23
The processing action of the actually executed signal is called the Delivery, the State between the signal generation and the Delivery, and the Pending ). A process can Block a signal. When a blocked signal is generated, it remains in the pending state until the process unblocks the signal. Note that blocking and ignoring are different. As long as the signal is blocked, it will not be delivered.
) sigpwr power supply failure/restart
31) invalid sigsys system call.
In the Signals listed above,Signals that cannot be captured, blocked, or ignored by programs include: sigkill and sigstop.Signals that cannot be restored to the default action include: sigill and sigtrap.By default, the signals that cause process abortion include: SIGABRT, sigbus, sigfpe, sigill, sigiot, sigquit, SIGSEGV, sigtrap, sigxcpu, sigxfszBy default, the process exits with the following signals: sigalrm, sighup,
the return value of the system () function, and the introduction to its return value is in the previous article. The system () function is sometimes convenient, but not abusive!1. It is recommended that the system () function be used only to execute shell commands, because in general, the system () return value is not 0 to indicate an error;2, it is recommended to monitor the system () function after the completion of the errno value, for error when giving more useful information;3. It is recom
Nohup./a.out Run the program, what will be the effect?After you run the program using Nohup./a.out , you can see:
will show the process number at the terminal is 32524
There will also be a "ignore input, output to nohup.out" hint
Type CTRL + C to send a SIGINT signal that does not seem to respond.Close session, send Sighup signal, and then take a look.The process with ID 32524 still exists, and it can only be closed with kill.Concl
Article Title: inotify is an essential tool for Linux File System Monitoring. Linux is a technology channel of the IT lab in China. Includes basic categories such as desktop applications, Linux system management, kernel research, embedded systems, and open source.
This article describes how to use inotify to control events in a
http://blog.csdn.net/eager7/article/details/8290937We run the following command to see a list of supported signals from Linux:$ kill-l1) SIGHUP 2) SIGINT 3) Sigquit 4) Sigill 5) SIGTRAP 6) SIGABRT 7) Sigbus 8) SIGFPE 9) SIGKILL) SIGUSR1) SIG SEGV) (SIGUSR213) sigpipe) sigalrm) SIGTERM) SIGCHLD18) sigcont) SIGSTOP) SIGTSTP (Sigurg) sigxcpu) SIGXFSZ26) (SIGVTALRM) sigprof) sigwinch) SIGIO30) SIGPWR) sigsys) S
progress, do not block the signal processing function itself signal function.Sa_nomask: With Sa_nodeferSa_oneshot: When the signal processing function of the user registration is executed once, the processing function of the signal is set to the system default handler function.Sa_resethand: With Sa_oneshotSa_restart: A system call that could not be rerun is automatically rerun.Sa_siginfo: Indicates that the signal processing function is specified by sa_sigaction and not by Sa_handler, it will d
mask will be blocked **/(i.e., added to the SI Gnal Mask of the thread in which, the signal handler is invoked)During execution of the signal handler. In addition, the signal which triggered the handler would be blocked,Unless the SA_NODEFER flag is used./** when executing handler, if the process receives a signal that the sa_mask contains, the signals will not be responded to until the handler function finishes executingUnlike Sigprocmask, a sigprocmask is a signal screen character that specif
I. What are the signals that have been used in Windows? We all know that when we cannot end a program normally, we can use the task manager to force the process to end. But how is this actually implemented? In Linux, the same function is implemented by generating and capturing signals. A running process captures this signal and then performs some operations and is terminated. A signal is an event generated when the Unix and
output queues when generating SIGINT, sigquit, and sigsusp signals, that is, disable flush in the queue.Tostop: Send the sigttou signal to the background process group of the write control terminal (send the information to the background for processing ).Pendin: (not POSIX; not supported in Linux) when reading the next character, all characters in the input queue are output again. (Bash uses it to process
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.