summaryrefslogtreecommitdiff
path: root/src/exitcode.h
blob: dde081027e0a3c7b4870715b32cef5b8524bf6cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
/* -*- c-file-style: "java"; indent-tabs-mode: nil; tab-width: 4; fill-column: 78 -*-
 *
 * distcc -- A simple distributed compiler system
 *
 * Copyright (C) 2002, 2003, 2004 by Martin Pool <mbp@samba.org>
 * Copyright 2007 Google Inc.
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License
 * as published by the Free Software Foundation; either version 2
 * of the License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
 * USA.
 */

#ifndef _DISTCC_EXITCODE_H
#define _DISTCC_EXITCODE_H

/**
 * @file
 *
 * Common exit codes.
 **/

/**
 * Common exit codes for both client and server.
 *
 * These need to be in [1,255] so that they can be used as exit() codes.  They
 * are fairly high so that they're not confused with the real error code from
 * gcc.
 *
 * WARNING: ANY CHANGES HERE NEED TO BE DUPLICATED IN THE MAN PAGE
 * (../man/distcc.1).
 **/
enum dcc_exitcode {
    EXIT_DISTCC_FAILED            = 100, /**< General failure */
    EXIT_BAD_ARGUMENTS            = 101,
    EXIT_BIND_FAILED              = 102,
    EXIT_CONNECT_FAILED           = 103,
    EXIT_COMPILER_CRASHED         = 104,
    EXIT_OUT_OF_MEMORY            = 105,
    EXIT_BAD_HOSTSPEC             = 106,
    EXIT_IO_ERROR                 = 107,
    EXIT_TRUNCATED                = 108,
    EXIT_PROTOCOL_ERROR           = 109,
    EXIT_COMPILER_MISSING         = 110, /**< Compiler executable not found */
    EXIT_RECURSION                = 111, /**< distcc called itself */
    EXIT_SETUID_FAILED            = 112, /**< Failed to discard privileges */
    EXIT_ACCESS_DENIED            = 113, /**< Network access denied */
    EXIT_BUSY                     = 114, /**< In use by another process. */
    EXIT_NO_SUCH_FILE             = 115,
    EXIT_NO_HOSTS                 = 116,
    EXIT_GONE                     = 117, /**< No longer relevant */
#ifdef HAVE_GSSAPI
    EXIT_TIMEOUT                  = 118,
    EXIT_GSSAPI_FAILED            = 119 /**< GSS-API - Catchall error code for GSS-API related errors. */
#else
    EXIT_TIMEOUT                  = 118
#endif
};


#endif /* _DISTCC_EXITCODE_H */