June 12 Flashcards
(3 cards)
1
Q
fork
A
creates a child process
calls and creates a duplicate of the currently runnning program
each run cocurrently and independently
fork takes no arguemnts and returns process ID
2
Q
fork returns
A
0 to the child
PID to parent
on failure fork returns -1
3
Q
wait
A
suspends till one child terminates
return PID of terminated child
return -1 if doesnt have any child processes