What level of process status inheritance allows it to transition to zombie mode after the parent process finishes?
sobes.tech AI
Answer from AI
In Unix-like systems, when a child process terminates, it enters a zombie state until the parent process reads its status (via wait() or similar). If the parent process terminates earlier, the child process becomes a descendant of the init process (PID 1), which automatically collects the termination status of child processes.
Therefore, the level of process inheritance at which a process enters zombie mode after the parent terminates is when the parent process still exists and has not called wait(). If the parent has finished, the zombie process will be collected by init and will not remain in zombie state.
In other words, zombie status is preserved as long as the parent process exists and has not processed the child's status.