Exit Codes

From Leo's Notes
Revision as of 16:10, 14 July 2020 by Leo (talk | contribs) (Created page with "Here are some common exit codes that may be returned by a program or script. {| class="wikitable" !Status !Description |- |0 |Successful Termination |- |1 |General Error |- |1...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
This page was last edited on 14 July 2020, at 16:10.

Here are some common exit codes that may be returned by a program or script.

Status Description
0 Successful Termination
1 General Error
126 Cannot Execute
127 Command Not Found
128+n Fatal error signal n, where n is the signal number as defined in:

https://man7.org/linux/man-pages/man7/signal.7.html

130 Program Interrupted (SIGINT, 2), such as termination from Ctrl-C
134 Program Abort (SIGABRT, 6)
136 Erroneous Arithmetic Operation (SIGFPE, 8), such as division by zero
139 Segmentation Fault (SIGSEGV, 11)
255 maximum exit code. exit 3809 results in 225 (3809 % 256)

See Also