]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - include/exitcodes.h
...because every now and again, i have to do a massive commit.
[user/henk/code/inspircd.git] / include / exitcodes.h
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd: (C) 2002-2010 InspIRCd Development Team
6  * See: http://wiki.inspircd.org/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         EXIT_STATUS_BADHANDLER = 16,            /* Bad command handler loaded */
38         EXIT_STATUS_RSCH_FAILED = 17,           /* Windows service specific failure, will name these later */
39         EXIT_STATUS_UPDATESCM_FAILED = 18,      /* Windows service specific failure, will name these later */
40         EXIT_STATUS_CREATE_EVENT_FAILED = 19    /* Windows service specific failure, will name these later */
41 };
42
43 /** Array that maps exit codes (ExitStatus types) to
44  * human-readable strings to be shown on shutdown.
45  */
46 extern const char * ExitCodes[];
47
48 #endif
49