Professional Documents
Culture Documents
Chapter 7
Chapter 7
process
Example:
when you run cat from the shell.
The shell first forks another shell process.
The newly forked shell then overlays itself with the executable image of cat,
which then starts to run.
The parent (the original shell) waits for cat to terminate and then picks up
the exit status of the child.
UID: user id
GID: group id
Inheritance here implies that the child has its own copy of these parameters and
can thus alter the operating environment it has inherited.
This also means that the modified environment is not available to the parent
process.
x: is local variable
Create new process
• When you export the variable, its value is available recursively to all
child processes.
• However, when the child alters the value of the variable, the change is
not seen in the parent.
This should not surprise us since the child works with its own copy of
the environment.
Catch