Introduction

A process is a program that is currently running. It consists of the executable instructions for the program, the program data, and stack data. Processes are uniquely identified by their process id number, or PID.

Processes are created by other processes via the fork() system call. For example, when you type ls and hit <enter>, the process that is your shell forks, creating a nearly exact (with everything the same except the pid) duplicate of itself. The copy then immediately cedes control of its system resources to the ls program by running an exec() system call. In this way, all processes are descended from init.

The process created via a fork() is referred to as the child; the process that forked is called the parent. In some ...

Get Linux® Desk Reference, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.