Linux Programming Learning notes-Process

Source: Internet
Author: User
A process is a program that runs. There are two ways to execute another procedure in one program: 1) system executes the program in the Shell 2) fork + exec replicates a process that replaces the existing program fork with a new program in the process to copy the currently executing process. A process becomes two processes. Judging by the return value of the function is in that process. The PID of the child process is returned in the parent process. exec replaces the currently executing program with a new program. The wait parent process waits for the (block) child process to end. Nice adjusts the niceness of the process, and the positive number is the priority of reducing process scheduling. Signal is an asynchronous communication mechanism. After the process receives the signal, interrupts the current processing and executes the signal processing function. Process, you can register the handler of the signal.  Common signals: SIGTERM SIGKILL SIGABRT SIGUSR1 where SIGKILL cannot be ignored in the process. After the zombie process subprocess finishes executing, the parent process obtains the end information for the child process by calling wait. If there is no parent process to wait, the end state information for the child process remains until it is cleaned up by the init process. This consumes the resources of the system. Ways to clean up the zombie: 1) through WAIT3, WAIT4 polling 2) processes the child process complete signal in the parent process date:2014.11.5

Linux Programming Learning notes-Process

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.