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

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

fork returns

A

0 to the child
PID to parent
on failure fork returns -1

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

wait

A

suspends till one child terminates
return PID of terminated child
return -1 if doesnt have any child processes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly