Beginner Operating Systems
Q21 / 100

What does fork() do in Unix/Linux?

Correct! Well done.

Incorrect.

The correct answer is B) Creates a new child process as a copy of the parent, returning 0 to child and the child's PID to parent

B

Correct Answer

Creates a new child process as a copy of the parent, returning 0 to child and the child's PID to parent

Explanation

fork() duplicates the calling process. Parent gets child's PID (>0); child gets 0. Both continue executing from the point after fork(). exec() replaces the process image.

Progress
21/100