Question 310
A production Linux service requires a fix for this issue: A process survives the logout of the shell that launched it despite no interactive session. Which implementation step BEST resolves it?
Explanation
Correct Answer
Ordinary foreground shell jobs often receive hangup when the terminal closes. This action corrects the relevant condition. Verify that the job continues without depending on the terminal session.
Incorrect Answers
This change addresses a script searches for a service process by name using ps output parsed with grep. The present problem is different: ordinary foreground shell jobs often receive hangup when the terminal closes. Applying the alternative would leave the key cause unresolved.
It would correct a separate failure, a batch job is stopped with Ctrl+Z but should continue running in the background. In this environment, ordinary foreground shell jobs often receive hangup when the terminal closes; the indicated alternative does not meet the acceptance test.
That remedy is appropriate when an administrator wants to check what files a running daemon has open before restarting it. It targets lsof reports the files and sockets currently held by a process; here ordinary foreground shell jobs often receive hangup when the terminal closes, so it does not directly repair the observed fault.





CompTIA Linux+ (XK0-006) Practice Tests