X-Git-Url: https://code.citadel.org/?p=citadel.git;a=blobdiff_plain;f=citadel%2Fserver_main.c;h=33fdc33bcca13daed5bfa5ccf6a778dcdad08e63;hp=9dad4d756ae51602d73882e8ec15acb9752bee5e;hb=6e9fd5f635b9eccd27c91f22b4d8690279e6c20d;hpb=9862647b1a86bf542b4d2f5a139d944f2e2ad02d diff --git a/citadel/server_main.c b/citadel/server_main.c index 9dad4d756..33fdc33bc 100644 --- a/citadel/server_main.c +++ b/citadel/server_main.c @@ -1,16 +1,15 @@ -/* - * citserver's main() function lives here. - * - * Copyright (c) 1987-2021 by the citadel.org team - * - * This program is open source software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License version 3. - * - * 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. - */ +// citserver's main() function lives here. +// +// Copyright (c) 1987-2021 by the citadel.org team +// +// This program is open source software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License version 3. +// +// 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. + #include #include #include @@ -70,7 +69,7 @@ void ctdl_lockfile(int op) { int main(int argc, char **argv) { char facility[32]; - int a; /* General-purpose variables */ + int a; // General-purpose variables struct passwd pw, *pwp = NULL; char pwbuf[SIZ]; int drop_root_perms = 1; @@ -101,7 +100,7 @@ int main(int argc, char **argv) { syslog(LOG_INFO, "%s", libcitadel_version_string()); /* parse command-line arguments */ - while ((a=getopt(argc, argv, "cl:dh:x:t:B:Dru:s:")) != EOF) switch(a) { + while ((a=getopt(argc, argv, "cl:dh:x:t:B:Dru:s:b:")) != EOF) switch(a) { // test this binary for compatibility and exit case 'c': @@ -170,6 +169,10 @@ int main(int argc, char **argv) { sanity_diag_mode = atoi(optarg); break; + case 'b': + backtrace_filename = strdup(optarg); + break; + // any other parameter makes it crash and burn default: fprintf(stderr, "citserver: usage: "