010-100 · Question #26
What does the exit status 0 indicate about a process?
The correct answer is A. The process ended without any problems. In Unix and Linux systems, an exit status of 0 is the universal convention indicating that a process completed successfully without errors.
Question
What does the exit status 0 indicate about a process?
Options
- AThe process ended without any problems.
- BThe process was terminated by the user.
- CThe process couldn't finish correctly.
- DThe process waited for an input but got none.
- EThe process finished in time.
How the community answered
(32 responses)- A75% (24)
- B6% (2)
- C13% (4)
- D3% (1)
- E3% (1)
Why each option
In Unix and Linux systems, an exit status of 0 is the universal convention indicating that a process completed successfully without errors.
By POSIX convention, a process returns exit status 0 to the shell when it terminates without encountering any errors. Non-zero exit codes (1-255) are used to signal various error or abnormal conditions, making 0 the definitive indicator of success.
User termination via a signal such as SIGTERM or SIGINT typically results in a non-zero exit status, not 0.
Incorrect completion or errors are indicated by non-zero exit codes, commonly 1 or higher, not by exit status 0.
A process waiting for input that never arrives would typically exit with a non-zero error code or be terminated by a signal, not return 0.
Finishing 'in time' is not a concept tied to exit status; timing is unrelated to what exit code 0 represents.
Concept tested: Unix process exit status codes and conventions
Source: https://www.gnu.org/software/bash/manual/bash.html#Exit-Status
Topics
Community Discussion
No community discussion yet for this question.