Next | Unix Command Internals | 8 |
Why fork and then exec?
Why not a single call that does both?
fork_and_then_exec("/bin/ps");
The separation of fork and exec is probably the most brilliant innovation in the design of Unix
Because the child process can alter its environment before it does the exec
For example: ps > /tmp/procs
Next | Copyright © 2002 M. J. Dominus |