What this operating-systems process-creation question tests
This is a foundational question about Unix/Linux process management, specifically the fork() system call. It targets whether candidates understand the mechanics of process creation and how the kernel communicates the outcome to a parent process.
The question probes both knowledge of the API contract and conceptual clarity: after fork() succeeds, execution continues in two separate processes, and the kernel must distinguish between them. Your answer should reflect how the return value differs between the parent and child contexts, and why the design makes sense for process tree construction and control flow.
- Process identifiers (PIDs) and the process table
- Parent–child process relationships
- Control flow after system calls that create new processes
- Error handling and return-value semantics in system-level APIs