010-160 · Question #53
What does the exit status 0 indicate about a process?
The correct answer is A. The process ended without any problems. Exit status 0 is the universal POSIX convention indicating a process completed successfully without errors.
Question
Options
- AThe process ended without any problems.
- BThe process was terminated by the user.
- CThe process could not finish correctly.
- DThe process waited for an input but got none.
- EThe process finished in time.
How the community answered
(52 responses)- A94% (49)
- D4% (2)
- E2% (1)
Why each option
Exit status 0 is the universal POSIX convention indicating a process completed successfully without errors.
In POSIX-compliant systems, a process exits with status 0 to signal successful execution - no errors occurred. The kernel and parent processes (including shell scripts) use this value to determine whether to proceed or handle failure. Any non-zero exit status signals some form of failure or abnormal condition.
User termination via signals (e.g., SIGTERM or SIGKILL) results in non-zero exit statuses, not 0.
A process that could not finish correctly returns a non-zero exit code, typically 1 or higher, to signal failure.
Timing out or receiving no input would cause a non-zero exit status, not the success code of 0.
Exit codes do not convey timing information - finishing 'in time' is not a concept represented by exit status values.
Concept tested: POSIX process exit status codes and meaning
Source: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_08_02
Topics
Community Discussion
No community discussion yet for this question.