From: Moises Silva Date: Thu, 15 Dec 2011 17:34:56 +0000 (-0500) Subject: switch-core: changed the exit status when modules fail to load to 65 (EX_DATAERR... X-Git-Tag: v1.2.3^2~71^2^2~217^2~8^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=09dd96455e20996cb4be31c310b13357fb149142;p=thirdparty%2Ffreeswitch.git switch-core: changed the exit status when modules fail to load to 65 (EX_DATAERR), init scripts must be updated to handle 65 instead of 1 to detect module loading errors --- diff --git a/src/switch.c b/src/switch.c index 038dd2c759..d33f8170c2 100644 --- a/src/switch.c +++ b/src/switch.c @@ -898,7 +898,9 @@ int main(int argc, char *argv[]) if (switch_core_init_and_modload(flags, nc ? SWITCH_FALSE : SWITCH_TRUE, &err) != SWITCH_STATUS_SUCCESS) { fprintf(stderr, "Failed to initialize modules: %s\n", err); - return 1; + /* 65 is EX_DATAERR (see sysexits.h), meaning some input from the user failed, some init scripts use + * this to tell when fs fails to start due to configuration error */ + return 65; } if (switch_file_open(&fd, pid_path, SWITCH_FOPEN_READ, SWITCH_FPROT_UREAD | SWITCH_FPROT_UWRITE, pool) == SWITCH_STATUS_SUCCESS) {