]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/exitcodes.h
DO NOT USE THIS COMMIT - if you do, most of the modules wont work.
[user/henk/code/inspircd.git] / include / exitcodes.h
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd: (C) 2002-2007 InspIRCd Development Team
6  * See: http://www.inspircd.org/wiki/index.php/Credits
7  *
8  * This program is free but copyrighted software; see
9  *            the file COPYING for details.
10  *
11  * ---------------------------------------------------
12  */
13
14 #ifndef __EXITCODE_H__
15 #define __EXITCODE_H__
16
17 /** Valid exit codes to be used with InspIRCd::Exit()
18  */
19 enum ExitStatus
20 {
21         EXIT_STATUS_NOERROR = 0,
22         EXIT_STATUS_DIE = 1,
23         EXIT_STATUS_FAILED_EXEC = 2,
24         EXIT_STATUS_INTERNAL = 3,
25         EXIT_STATUS_CONFIG = 4,
26         EXIT_STATUS_LOG = 5,
27         EXIT_STATUS_FORK = 6,
28         EXIT_STATUS_ARGV = 7,
29         EXIT_STATUS_BIND = 8,
30         EXIT_STATUS_PID = 9,
31         EXIT_STATUS_SOCKETENGINE = 10,
32         EXIT_STATUS_ROOT = 11,
33         EXIT_STATUS_DIETAG = 12,
34         EXIT_STATUS_MODULE = 13,
35         EXIT_STATUS_SIGTERM = 15        /* Note: dont move this value. It corresponds with the value of #define SIGTERM. */
36 };
37
38 /** Array that maps exit codes (ExitStatus types) to
39  * human-readable strings to be shown on shutdown.
40  */
41 const char* ExitCodes[] =
42 {
43         "No error", /* 0 */
44         "DIE command", /* 1 */
45         "execv() failed", /* 2 */
46         "Internal error", /* 3 */
47         "Config file error", /* 4 */
48         "Logfile error", /* 5 */
49         "Fork failed", /* 6 */
50         "Bad commandline parameters", /* 7 */
51         "No ports could be bound", /* 8 */
52         "Can't write PID file", /* 9 */
53         "SocketEngine could not initialize", /* 10 */
54         "Refusing to start up as root", /* 11 */
55         "Found a <die> tag!", /* 12 */
56         "Couldn't load module on startup", /* 13 */
57         "", /* 14 */
58         "Received SIGTERM", /* 15 */
59 };
60
61 #endif