Parent process

From Wikipedia, the free encyclopedia

A parent process is a computer process that has created one or more child processes.

In UNIX, every process except process 0 (the swapper) is created when another process executes the fork system call. The process that invoked fork is the parent process and the newly-created process is the child process. Every process (except process 0) has one parent process, but can have many child processes.

The kernel identifies each process by its process identifier (PID). Process 0 is a special process that is created when the system boots; after forking a child process (process 1), process 0 becomes the swapper process. Process 1, known as init, is the ancestor of every other process in the system.

When a child process terminates execution, either by calling the exit system call, causing a fatal execution error, or receiving a terminating signal, an exit status is returned to the operating system. The parent process is informed of its child's termination through a SIGCHLD signal. A parent will typically retrieve its child's exit status by calling the wait system call. However, if a parent does not do so, the child process becomes a zombie process.


This article was originally based on material from the Free On-line Dictionary of Computing, which is licensed under the GFDL.