]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/exitcodes.h
b4222269774b5f53c4421429c040a907b5e5af04
[user/henk/code/inspircd.git] / include / exitcodes.h
1 #ifndef __EXITCODE_H__
2 #define __EXITCODE_H__
3
4 /** Valid exit codes to be used with InspIRCd::Exit()
5  *  */
6 enum ExitStatus
7 {
8         EXIT_STATUS_NOERROR = 0,
9         EXIT_STATUS_DIE = 1,
10         EXIT_STATUS_FAILED_EXEC = 2,
11         EXIT_STATUS_INTERNAL = 3,
12         EXIT_STATUS_CONFIG = 4,
13         EXIT_STATUS_LOG = 5,
14         EXIT_STATUS_FORK = 6,
15         EXIT_STATUS_ARGV = 7,
16         EXIT_STATUS_BIND = 8,
17         EXIT_STATUS_PID = 9,
18         EXIT_STATUS_SOCKETENGINE = 10,
19         EXIT_STATUS_ROOT = 11,
20         EXIT_STATUS_DIETAG = 12,
21         EXIT_STATUS_MODULE = 13,
22         EXIT_STATUS_SIGTERM = 15        /* Note: dont move this value. It corresponds with the value of #define SIGTERM. */
23 };
24
25 /** Array that maps exit codes (ExitStatus types) to
26  *  * human-readable strings to be shown on shutdown.
27  *   */
28 const char* ExitCodes[] =
29 {
30         "No error", /* 0 */
31         "DIE command", /* 1 */
32         "execv() failed", /* 2 */
33         "Internal error", /* 3 */
34         "Config file error", /* 4 */
35         "Logfile error", /* 5 */
36         "Fork failed", /* 6 */
37         "Bad commandline parameters", /* 7 */
38         "No ports could be bound", /* 8 */
39         "Can't write PID file", /* 9 */
40         "SocketEngine could not initialize", /* 10 */
41         "Refusing to start up as root", /* 11 */
42         "Found a <die> tag!", /* 12 */
43         "Couldn't load module on startup", /* 13 */
44         "", /* 14 */
45         "Received SIGTERM", /* 15 */
46 };
47
48 #endif