Starting a Process
Whenever you issue a command in UNIX, it creates, or starts, a new process on your behalf. When you tried out the ls command to list directory contents in Chapter 4, “Working with Directories,” the system started a process, the ls command, for you.
UNIX tracks processes through a five-digit ID number known as the pid (short for process identifier). Each process in the system has a unique pid between 1 and 32,767. Pids eventually repeat when all the possible numbers are used. Two processes with the same pid cannot be concurrently executed on the system.
Foreground Processes
By default, every process runs in the foreground. It gets its input from the keyboard and sends its output to the screen. You can see this happen with the ...
Get Sams Teach Yourself Shell Programming in 24 Hours, 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.