Multiple choice

What is the return value of fork() system call in the parent process when the child process has been successfully created?

  1. Zero

  2. -1

  3. Any negative value

  4. No return value

  5. A positive value

Reveal answer Fill a bubble to check yourself
E Correct answer
Explanation

The return value in the parent process is the process identifier of the newly created child process (a positive value).