nerdexam
LPI

010-150 · Question #55

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 Unix/Linux convention for successful process completion. Any non-zero exit status indicates some form of error or abnormal termination.

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

(14 responses)
  • A
    71% (10)
  • B
    14% (2)
  • C
    7% (1)
  • E
    7% (1)

Why each option

Exit status 0 is the universal Unix/Linux convention for successful process completion. Any non-zero exit status indicates some form of error or abnormal termination.

AThe process ended without any problems.Correct

By POSIX convention, an exit status of 0 means the process completed successfully without errors. This is the standard return value a program uses to signal to the shell or calling process that execution finished as expected, with no errors encountered.

BThe process was terminated by the user.

User termination (e.g., via SIGTERM or SIGINT) typically results in a non-zero exit status, often 130 for Ctrl+C.

CThe process couldn't finish correctly.

A process that could not finish correctly returns a non-zero exit status (commonly 1 or higher) to signal failure.

DThe process waited for an input but got none.

Waiting for input with no response would typically cause the process to block or exit with a non-zero code, not 0.

EThe process finished in time.

There is no standard exit code specifically meaning 'finished in time'; timing is not conveyed by exit status 0.

Concept tested: Unix process exit status codes and conventions

Source: https://pubs.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#tag_18_08_02

Topics

#exit status#process exit codes#process management

Community Discussion

No community discussion yet for this question.

Full 010-150 Practice