Multiple choice

Which of the following calls never returns an error?

  1. Fork

  2. Getpid

  3. Open

  4. Ready

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

The getpid() system call returns the process ID of the calling process. Since every process has a valid PID, this call is guaranteed to succeed and does not return an error.