Skip to content

Commit 0276ffa

Browse files
Cj-bcniieani
authored andcommitted
feat(exits): add list of exit codes (#74)
Those values are come from /usr/include/sysexits.h
1 parent 93ebbd8 commit 0276ffa

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

lib/util/exits.sh

+24
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/usr/bin/env bash
2+
#
3+
# exits
4+
#
5+
# Those values are come from /usr/include/sysexits.h
6+
#
7+
8+
# successful termination
9+
Util_ExitCode_OK=0
10+
Util_ExitCode_USAGE=64 # command line usage error
11+
Util_ExitCode_DATAERR=65 # data format error
12+
Util_ExitCode_NOINPUT=66 # cannot open input
13+
Util_ExitCode_NOUSER=67 # addressee unknown
14+
Util_ExitCode_NOHOST=68 # host name unknown
15+
Util_ExitCode_UNAVAILABLE=69 # service unavailable
16+
Util_ExitCode_SOFTWARE=70 # internal software error
17+
Util_ExitCode_OSERR=71 # system error (e.g., can't fork)
18+
Util_ExitCode_OSFILE=72 # critical OS file missing
19+
Util_ExitCode_CANTCREAT=73 # can't create (user) output file
20+
Util_ExitCode_IOERR=74 # input/output error
21+
Util_ExitCode_TEMPFAIL=75 # temp failure; user is invited to retry
22+
Util_ExitCode_PROTOCOL=76 # remote error in protocol
23+
Util_ExitCode_NOPERM=77 # permission denied
24+
Util_ExitCode_CONFIG=78 # configuration error

0 commit comments

Comments
 (0)