]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/exitcodes.h
OOPS! We try again, since I'm smoking craq. LF is 0x0a NOT CR.
[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,        /* No error */
22         EXIT_STATUS_DIE = 1,            /* Operator issued DIE */
23         EXIT_STATUS_FAILED_EXEC = 2,    /* execv() failed */
24         EXIT_STATUS_INTERNAL = 3,       /* Internal error */
25         EXIT_STATUS_CONFIG = 4,         /* Config error */
26         EXIT_STATUS_LOG = 5,            /* Log file error */
27         EXIT_STATUS_FORK = 6,           /* fork() failed */
28         EXIT_STATUS_ARGV = 7,           /* Invalid program arguments */
29         EXIT_STATUS_BIND = 8,           /* Port binding failed on all ports */
30         EXIT_STATUS_PID = 9,            /* Couldn't write PID file */
31         EXIT_STATUS_SOCKETENGINE = 10,  /* Couldn't start socket engine */
32         EXIT_STATUS_ROOT = 11,          /* Refusing to start as root */
33         EXIT_STATUS_DIETAG = 12,        /* Found a die tag in the config file */
34         EXIT_STATUS_MODULE = 13,        /* Couldn't load a required module */
35         EXIT_STATUS_CREATEPROCESS = 14, /* CreateProcess failed (windows) */
36         EXIT_STATUS_SIGTERM = 15        /* Note: dont move this value. It corresponds with the value of #define SIGTERM. */
37 };
38
39 /** Array that maps exit codes (ExitStatus types) to
40  * human-readable strings to be shown on shutdown.
41  */
42 extern const char * ExitCodes[];
43
44 #endif
45