nerdexam
LPI

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.

The Power of the Command Line

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)
  • A
    75% (24)
  • B
    6% (2)
  • C
    13% (4)
  • D
    3% (1)
  • E
    3% (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.

AThe process ended without any problems.Correct

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.

BThe process was terminated by the user.

User termination via a signal such as SIGTERM or SIGINT typically results in a non-zero exit status, not 0.

CThe process couldn't finish correctly.

Incorrect completion or errors are indicated by non-zero exit codes, commonly 1 or higher, not by exit status 0.

DThe process waited for an input but got none.

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.

EThe process finished in time.

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

#exit status#process termination#return codes#shell scripting

Community Discussion

No community discussion yet for this question.

Full 010-100 Practice