61.3k views
5 votes
In UNIX, the return value for the fork system call is _____ for the child process and _____ for the parent process.

a) A Negative integer, Zero
b) Zero, A Negative integer
c) Zero, A nonzero integer
d) A nonzero integer, Zero

User EnKrypt
by
7.8k points

1 Answer

3 votes

Final answer:

The return value for the fork system call in UNIX is Zero for the child process and a nonzero integer (process ID of the child) for the parent process.

Step-by-step explanation:

The return value for the fork system call in UNIX is Zero for the child process and a nonzero integer (process ID of the child) for the parent process.

The fork system call in UNIX is used to create a new process by duplicating the existing process. The new process is called the child process, and the existing process is called the parent process.

Here is an example:






User MrAbelash
by
8.7k points