Next | Unix Command Internals | 7 |
Suppose you type ps at the shell prompt. What happens?
First the shell forks; this creates a new process
The new process is an exact clone of the original shell
It's called the child process
Then the child execs /bin/ps
The parent waits for the child to finish
(or else the shell prompt would get mixed up with the ps output)
(ps & is almost the same, but without the wait)
Next | Copyright © 2003 M. J. Dominus |