MCQs City stays free thanks to ads. Please turn off your ad blocker for this site so content and features keep working.
Operating System
Process Creation
Q
In UNIX, the return value for the fork system call is _____ for the child process and _____ for the parent process.
AA. A negative integer, zero
BB. Zero, a negative integer
CC. Zero, a nonzero integer
DD. Process to the parent and returns zero to that newly created (child) process.
Correct Answer:
C. C. Zero, a nonzero integer
Explanation:
In Unix, the return value of the fork system call is Zero for the child process and Non-zero value for parent process. A fork system call returns the PID of a newly created (child) process to the parent and returns Zero to that newly created (child) process.