/[cvs]/eggdrop1.9/src/main.c
ViewVC logotype

Annotation of /eggdrop1.9/src/main.c

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.173 - (hide annotations) (download) (as text)
Mon Jun 21 19:04:51 2004 UTC (15 years, 2 months ago) by stdarg
Branch: MAIN
Changes since 1.172: +48 -135 lines
File MIME type: text/x-chdr
* Trying a simpler method of forking into the background.
* Trying a lockfile approach -- seems to work well so far.

1 wcc 1.156 /* main.c
2 guppy 1.56 *
3     * Copyright (C) 1997 Robey Pointer
4 wcc 1.153 * Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 Eggheads Development Team
5 guppy 1.56 *
6 fabian 1.14 * This program is free software; you can redistribute it and/or
7     * modify it under the terms of the GNU General Public License
8     * as published by the Free Software Foundation; either version 2
9     * of the License, or (at your option) any later version.
10 guppy 1.56 *
11 segfault 1.1 * This program is distributed in the hope that it will be useful,
12     * but WITHOUT ANY WARRANTY; without even the implied warranty of
13     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14     * GNU General Public License for more details.
15 guppy 1.56 *
16 segfault 1.1 * You should have received a copy of the GNU General Public License
17     * along with this program; if not, write to the Free Software
18 fabian 1.14 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19     */
20 tothwolf 1.117
21     #ifndef lint
22 stdarg 1.173 static const char rcsid[] = "$Id: main.c,v 1.172 2004/06/21 14:26:02 stdarg Exp $";
23 wcc 1.156 #endif
24    
25     #if HAVE_CONFIG_H
26     # include <config.h>
27 tothwolf 1.117 #endif
28 segfault 1.1
29 wcc 1.158 #include <eggdrop/eggdrop.h>
30 stdarg 1.151 #include <ctype.h>
31 stdarg 1.145 #include <unistd.h>
32 wcc 1.156 #include <fcntl.h>
33 wcc 1.158 #include <string.h>
34     #include <stdlib.h>
35     #include <sys/stat.h>
36     #include <errno.h>
37     #include <signal.h>
38     #include <netdb.h>
39     #include <setjmp.h>
40     #include <locale.h>
41     #include <ctype.h>
42     #include <ltdl.h>
43 wcc 1.154
44 wcc 1.161 #include <eggdrop/stat.h>
45    
46 wcc 1.129 #ifdef TIME_WITH_SYS_TIME
47     # include <sys/time.h>
48     # include <time.h>
49 wcc 1.154 #else
50     # ifdef HAVE_SYS_TIME_H
51     # include <sys/time.h>
52     # else
53     # include <time.h>
54     # endif
55 wcc 1.129 #endif
56 wcc 1.154
57 wcc 1.158 #include "lib/compat/compat.h"
58     #include "debug.h"
59     #include "core_config.h"
60 wingman 1.167 #include "core_party.h"
61 wcc 1.158 #include "core_binds.h"
62     #include "logfile.h"
63 wingman 1.171 #include "terminal.h"
64 wingman 1.167 #include "bg.h"
65     #include "main.h"
66 ite 1.76
67 wcc 1.154 #ifdef STOP_UAC /* OSF/1 complains a lot */
68     # include <sys/sysinfo.h>
69     # define UAC_NOPRINT 0x00000001 /* Don't report unaligned fixups */
70 segfault 1.1 #endif
71 drummer 1.71
72 poptix 1.62 #ifdef CYGWIN_HACKS
73 wcc 1.154 # include <windows.h>
74 poptix 1.62 #endif
75    
76 segfault 1.1 #ifndef _POSIX_SOURCE
77 wcc 1.154 # define _POSIX_SOURCE 1 /* Solaris needs this */
78 segfault 1.1 #endif
79    
80 wingman 1.171 #define RUNMODE_NORMAL 1
81     #define RUNMODE_SHUTDOWN 2
82     #define RUNMODE_RESTART 3
83    
84     int runmode = 1; /* The most important variable ever! */
85 wcc 1.154 int backgrd = 1; /* Run in the background? */
86     int make_userfile = 0; /* Start bot in make-userfile mode? */
87 wingman 1.171 int terminal_mode = 0; /* Terminal mode */
88 wcc 1.154
89 stdarg 1.166 const char *configfile = NULL; /* Name of the config file */
90     char pid_file[512]; /* Name of Eggdrop's pid file */
91 wcc 1.154
92     time_t online_since; /* Time the bot was started */
93     time_t now; /* Current time */
94     egg_timeval_t egg_timeval_now; /* Current time in seconds and microseconds. */
95 segfault 1.1
96 wcc 1.154 int use_stderr = 1; /* Send stuff to stderr instead of logfiles? */
97 ite 1.109
98 wcc 1.155 char version[81];
99    
100 wcc 1.154 static int lastmin = 99;
101     static struct tm nowtm;
102    
103     void core_config_init();
104 fabian 1.27
105 stdarg 1.173 void fatal(const char *errmsg)
106 segfault 1.1 {
107 stdarg 1.173 putlog(LOG_MISC, "*", "Fatal: %s", errmsg);
108 wcc 1.154 flushlogs();
109 stdarg 1.173 exit(1);
110 segfault 1.1 }
111    
112     static void got_bus(int z)
113     {
114 stdarg 1.173 fatal("BUS ERROR.");
115 segfault 1.1 }
116    
117     static void got_segv(int z)
118     {
119 stdarg 1.173 fatal("SEGMENT VIOLATION.");
120 segfault 1.1 }
121    
122     static void got_fpe(int z)
123     {
124 stdarg 1.173 fatal("FLOATING POINT ERROR.");
125 segfault 1.1 }
126    
127     static void got_term(int z)
128     {
129 wcc 1.154 eggdrop_event("sigterm");
130 stdarg 1.173 if (core_config.die_on_sigterm) core_shutdown(SHUTDOWN_SIGTERM, NULL, NULL);
131     else putlog(LOG_MISC, "*", _("Received TERM signal (ignoring)."));
132 segfault 1.1 }
133    
134     static void got_quit(int z)
135     {
136 wcc 1.154 eggdrop_event("sigquit");
137 wcc 1.157 putlog(LOG_MISC, "*", _("Received QUIT signal (ignoring)."));
138 wcc 1.154 return;
139 segfault 1.1 }
140    
141     static void got_hup(int z)
142     {
143 wcc 1.154 eggdrop_event("sighup");
144 wcc 1.157 putlog(LOG_MISC, "*", _("Received HUP signal (ignoring)."));
145 wcc 1.154 return;
146 segfault 1.1 }
147    
148 wcc 1.135 static void print_version(void)
149 segfault 1.1 {
150 wcc 1.154 printf("%s\n", version);
151 ite 1.114 }
152    
153 wcc 1.163 static void print_help(char *const *argv)
154 wcc 1.154 {
155     print_version();
156 wcc 1.157 printf(_("\nUsage: %s [OPTIONS]... [FILE]\n"), argv[0]);
157 wcc 1.154 printf(_("\n\
158 ite 1.114 -h, --help Print help and exit\n\
159     -v, --version Print version and exit\n\
160     -n, --foreground Don't go into the background (default=off)\n\
161     -c --channel-stats (with -n) Display channel stats every 10 seconds\n\
162     -t --terminal (with -n) Use terminal to simulate dcc-chat\n\
163     -m --make-userfile Userfile creation mode\n\
164 wcc 1.135 FILE optional config filename (default 'config.xml')\n"));
165 wcc 1.154 printf("\n");
166 ite 1.114 }
167 segfault 1.1
168 wcc 1.156 static void do_args(int argc, char *const *argv)
169 ite 1.114 {
170 wcc 1.154 int c;
171 ite 1.114
172 wcc 1.154 optarg = 0;
173     optind = 1;
174     opterr = 1;
175     optopt = '?';
176 ite 1.114
177 wcc 1.154 while (1) {
178     int option_index = 0;
179 ite 1.114
180 wcc 1.154 static struct option long_options[] = {
181     {"help", 0, NULL, 'h'},
182     {"version", 0, NULL, 'v'},
183     {"load-module", 1, NULL, 'p'},
184     {"foreground", 0, NULL, 'n'},
185     {"terminal", 0, NULL, 't'},
186     {"make-userfile", 0, NULL, 'm'},
187     {NULL, 0, NULL, 0}
188     };
189    
190     c = getopt_long(argc, argv, "hvp:nctm", long_options, &option_index);
191     if (c == -1) break;
192     switch (c) {
193     case 'n':
194     backgrd = 0;
195     break;
196     case 't':
197 wingman 1.171 terminal_mode = 1;
198 wcc 1.154 break;
199     case 'm':
200     make_userfile = 1;
201     break;
202     case 'v':
203     print_version();
204     exit(0);
205     break; /* this should never be reached */
206     case 'h':
207     print_help(argv);
208     exit(0);
209     break; /* this should never be reached */
210     case 0: /* Long option with no short option */
211     case '?': /* Invalid option. */
212     /* getopt_long() already printed an error message. */
213     exit(1);
214     default: /* bug: option not considered. */
215 wcc 1.157 fprintf(stderr, _("%s: option unknown: %c\n"), argv[0], c);
216 wcc 1.154 exit(1);
217     break; /* this should never be reached */
218     }
219     }
220 stdarg 1.166 if (optind < argc) configfile = argv[optind];
221     else configfile = "config.xml";
222 segfault 1.1 }
223    
224 fabian 1.34 /* Called once a second.
225 fabian 1.27 */
226 stdarg 1.139 static int core_secondly()
227 segfault 1.1 {
228 wcc 1.154 static int cnt = 0;
229     int miltime;
230 segfault 1.1
231 wcc 1.154 check_bind_secondly();
232     cnt++;
233     memcpy(&nowtm, localtime(&now), sizeof(struct tm));
234     if (nowtm.tm_min != lastmin) {
235     int i = 0;
236    
237     /* Once a minute */
238     lastmin = (lastmin + 1) % 60;
239     eggdrop_event("minutely");
240     check_bind_time(&nowtm);
241     /* In case for some reason more than 1 min has passed: */
242     while (nowtm.tm_min != lastmin) {
243     /* Timer drift, dammit */
244     putlog(LOG_DEBUG, "*", "timer: drift (lastmin=%d, now=%d)", lastmin, nowtm.tm_min);
245     i++;
246     lastmin = (lastmin + 1) % 60;
247     eggdrop_event("minutely");
248     }
249 wcc 1.157 if (i > 1) putlog(LOG_MISC, "*", _("Warning: timer drift (%d minutes)."), i);
250 segfault 1.1
251 wcc 1.154 miltime = (nowtm.tm_hour * 100) + (nowtm.tm_min);
252 stdarg 1.172 if (nowtm.tm_min % 5 == 0) { /* 5 minutes */
253 wcc 1.154 eggdrop_event("5minutely");
254     if (!miltime) { /* At midnight */
255     char s[25];
256    
257     strlcpy(s, ctime(&now), sizeof s);
258     putlog(LOG_ALL, "*", "--- %.11s%s", s, s + 20);
259     eggdrop_event("backup");
260     eggdrop_event("daily");
261     }
262     }
263     }
264     return(0);
265 segfault 1.1 }
266    
267 stdarg 1.140
268 stdarg 1.142 int file_check(const char *filename)
269     {
270     struct stat sbuf = {0};
271     int r;
272    
273     r = stat(filename, &sbuf);
274     if (r) return(-1);
275     errno = 0;
276     if (sbuf.st_mode & (S_IRGRP|S_IWGRP|S_IROTH|S_IWOTH)) return(-1);
277     return(0);
278     }
279    
280 wingman 1.171 static int create_userfile(void)
281 segfault 1.1 {
282 wingman 1.171 user_t *owner;
283     char handle[512], password[12];
284     int len;
285    
286     printf("\n");
287     if (user_count() != 0) {
288     printf("You are trying to create a new userfile, but the old one still exists (%s)!\n", core_config.userfile);
289     printf("Please remove the userfile, or do not pass the -m option.\n\n");
290 stdarg 1.172 return(-1);
291 wcc 1.154 }
292 wingman 1.171
293     printf("Hello! I see you are creating a new userfile.\n\n");
294     printf("Let's create the owner account.\n\n");
295     do {
296     printf("Enter the owner handle: ");
297     fflush(stdout);
298     fgets(handle, sizeof(handle), stdin);
299     for (len = 0; handle[len]; len++) {
300     if (!ispunct(handle[len]) && !isalnum(handle[len])) break;
301     }
302     if (len == 0) printf("Come on, enter a real handle.\n\n");
303     } while (len <= 0);
304     handle[len] = 0;
305    
306     owner = user_new(handle);
307     if (!owner) {
308     printf("Failed to create user record! Out of memory?\n\n");
309 stdarg 1.172 return(-1);
310 stdarg 1.145 }
311 wingman 1.171
312     user_rand_pass(password, sizeof(password));
313     user_set_pass(owner, password);
314     user_set_flags_str(owner, NULL, "+n");
315     printf("Your owner handle is '%s' and your password is '%s' (without the quotes).\n\n", handle, password);
316     memset(password, 0, sizeof(password));
317     str_redup(&core_config.owner, handle);
318     core_config_save();
319     user_save(core_config.userfile);
320    
321 stdarg 1.172 return(0);
322 wingman 1.171 }
323 stdarg 1.145
324 wingman 1.171 static void init_signals(void)
325     {
326     struct sigaction sv;
327 wcc 1.154
328 fabian 1.27
329 wcc 1.154 sv.sa_handler = got_bus;
330     sigemptyset(&sv.sa_mask);
331 segfault 1.1 #ifdef SA_RESETHAND
332 wcc 1.154 sv.sa_flags = SA_RESETHAND;
333 segfault 1.1 #else
334 wcc 1.154 sv.sa_flags = 0;
335 segfault 1.1 #endif
336 wcc 1.154 sigaction(SIGBUS, &sv, NULL);
337    
338     sv.sa_handler = got_segv;
339     sigaction(SIGSEGV, &sv, NULL);
340 segfault 1.1 #ifdef SA_RESETHAND
341 wcc 1.154 sv.sa_flags = 0;
342 segfault 1.1 #endif
343 wcc 1.154
344     sv.sa_handler = got_fpe;
345     sigaction(SIGFPE, &sv, NULL);
346    
347     sv.sa_handler = got_term;
348     sigaction(SIGTERM, &sv, NULL);
349    
350     sv.sa_handler = got_hup;
351     sigaction(SIGHUP, &sv, NULL);
352    
353     sv.sa_handler = got_quit;
354     sigaction(SIGQUIT, &sv, NULL);
355    
356     sv.sa_handler = SIG_IGN;
357     sigaction(SIGPIPE, &sv, NULL);
358 wingman 1.171 }
359    
360     static void core_shutdown_or_restart()
361     {
362     /* notifiy shutdown listeners */
363     check_bind_shutdown();
364    
365     putlog(LOG_MISC, "*", _("Saving user file..."));
366     user_save(core_config.userfile);
367 segfault 1.1
368 wingman 1.171 putlog(LOG_MISC, "*", _("Saving config file..."));
369     core_config_save();
370 wingman 1.167
371 wingman 1.171 /* shutdown logging */
372     logfile_shutdown();
373 wingman 1.167
374 wingman 1.171 /* shutdown libeggdrop */
375     eggdrop_shutdown();
376    
377 stdarg 1.172 /* force a garbage run */
378 wingman 1.171 garbage_run();
379    
380     /* just remove pid file if didn't restart */
381     if (runmode != RUNMODE_RESTART)
382     unlink(pid_file);
383     }
384    
385     int main(int argc, char **argv)
386     {
387     int timeout;
388    
389     #ifdef DEBUG
390     {
391     # include <sys/resource.h>
392     struct rlimit cdlim;
393 wingman 1.170
394 wingman 1.171 cdlim.rlim_cur = RLIM_INFINITY;
395     cdlim.rlim_max = RLIM_INFINITY;
396     setrlimit(RLIMIT_CORE, &cdlim);
397 stdarg 1.131 }
398 wingman 1.171 #endif
399    
400     init_signals();
401 wingman 1.167
402 wingman 1.171 #ifdef ENABLE_NLS
403     setlocale(LC_MESSAGES, "");
404     bindtextdomain(PACKAGE, LOCALEDIR);
405     textdomain(PACKAGE);
406     #endif
407    
408     /* Initialize ltdl. */
409     LTDL_SET_PRELOADED_SYMBOLS();
410     if (lt_dlinit()) {
411     printf("Fatal error initializing ltdl: %s\n", lt_dlerror());
412     return(-1);
413     }
414    
415     snprintf(version, sizeof version, "Eggdrop v%s (C) 1997 Robey Pointer (C) 2004 Eggheads Development Team", VERSION);
416    
417     #ifdef STOP_UAC
418     {
419     int nvpair[2];
420 wingman 1.170
421 wingman 1.171 nvpair[0] = SSIN_UACPROC;
422     nvpair[1] = UAC_NOPRINT;
423     setsysinfo(SSI_NVPAIRS, (char *) nvpair, 1, NULL, 0);
424     }
425     #endif
426    
427     timer_update_now(&egg_timeval_now);
428     now = egg_timeval_now.sec;
429     memcpy(&nowtm, localtime(&now), sizeof(struct tm));
430     lastmin = nowtm.tm_min;
431    
432     srandom(now % (getpid() + getppid()));
433    
434     do_args(argc, argv);
435     printf("\n%s\n", version);
436     printf("WARNING: Do NOT run this DEVELOPMENT version for any purpose other than testing.\n\n");
437    
438 stdarg 1.172 /* we may not run as root */
439 wingman 1.171 if (((int) getuid() == 0) || ((int) geteuid() == 0)) {
440 stdarg 1.173 fatal("Eggdrop will not run as root!");
441 wingman 1.171 return -1;
442     }
443    
444     /* config file may not be world read/writeable */
445     if (file_check(configfile)) {
446     if (errno) perror(configfile);
447     else {
448     fprintf(stderr, "ERROR\n");
449     fprintf(stderr, "\tCheck file permissions on your config file!");
450     fprintf(stderr, "\tMake sure other groups and users cannot read/write it.\n");
451     return -1;
452     }
453     }
454    
455     /* set uptime */
456     online_since = now;
457    
458     do {
459     egg_timeval_t howlong;
460    
461     /* default select timeout is 1 sec */
462     howlong.sec = 1;
463     howlong.usec = 0;
464 stdarg 1.172
465 wingman 1.171 timer_create_repeater(&howlong, "main loop", core_secondly);
466 stdarg 1.172
467 wingman 1.171 /* init core */
468     core_init();
469    
470     /* set normal running mode */
471     runmode = RUNMODE_NORMAL;
472 stdarg 1.172
473 wingman 1.171 putlog(LOG_DEBUG, "*", "Entering main loop.");
474    
475     /* main loop */
476     while (runmode == RUNMODE_NORMAL) {
477 stdarg 1.173 /* Update the time. */
478 wingman 1.171 timer_update_now(&egg_timeval_now);
479     now = egg_timeval_now.sec;
480 stdarg 1.173
481     /* Run any expired timers. */
482 wingman 1.171 timer_run();
483 stdarg 1.173
484     /* Figure out how long to wait for activity. */
485 wingman 1.171 if (timer_get_shortest(&howlong)) timeout = 1000;
486     else timeout = howlong.sec * 1000 + howlong.usec / 1000;
487 stdarg 1.173
488     /* Wait and monitor sockets. */
489 wingman 1.171 sockbuf_update_all(timeout);
490 stdarg 1.173
491     /* Run any scheduled cleanups. */
492 wingman 1.171 garbage_run();
493     }
494 stdarg 1.172
495 wingman 1.171 /* Save user file, config file, ... */
496     core_shutdown_or_restart();
497    
498     /* the only chance to loop again is that running = 2, meaning
499     we have a restart */
500     } while (runmode == RUNMODE_RESTART);
501 stdarg 1.172
502 wingman 1.170 return 1;
503     }
504    
505     int core_init()
506 wingman 1.171 {
507     int i;
508     char *name;
509     void *config_root, *entry;
510 stdarg 1.173 char datetime[25];
511     static int lockfd = -1;
512     struct flock lock;
513    
514 wingman 1.171 /* init libeggdrop */
515     eggdrop_init();
516    
517     /* load config */
518     core_config_init(configfile);
519 stdarg 1.172
520 stdarg 1.173 /* init logging */
521     logfile_init();
522    
523 stdarg 1.172 /* did the user specify -m? */
524     if (make_userfile) {
525     if (create_userfile()) return(-1);
526     make_userfile = 0;
527     }
528    
529 wingman 1.171 /* init background mode and pid file */
530 stdarg 1.173 if (runmode != RUNMODE_RESTART) {
531     if (backgrd) bg_begin_split();
532     }
533 stdarg 1.172
534 stdarg 1.173 /* Check lock file. */
535     if (core_config.lockfile && lockfd == -1) {
536     lockfd = open(core_config.lockfile, O_WRONLY | O_CREAT, S_IWUSR);
537     if (lockfd < 0) {
538     fatal("Could not open lock file!");
539     }
540     memset(&lock, 0, sizeof(lock));
541     lock.l_type = F_WRLCK;
542     if (fcntl(lockfd, F_SETLK, &lock) != 0) {
543     fatal("Lock file is already locked! Is eggdrop already running?");
544     }
545     }
546 wingman 1.171
547     /* just issue this "Loading Eggdrop" message if we are not
548     * restarting */
549     if (runmode != RUNMODE_RESTART) {
550 stdarg 1.173 strlcpy(datetime, ctime(&now), sizeof(datetime));
551     strcpy(&datetime[11], &datetime[20]);
552     putlog(LOG_ALL, "*", "Loading Eggdrop %s (%s)", VERSION, datetime);
553 wingman 1.171 }
554 stdarg 1.172
555 wingman 1.171 /* load userlist */
556     if (core_config.userfile)
557     user_load(core_config.userfile);
558 stdarg 1.172
559 wingman 1.171 /* init core bindings */
560     core_binds_init();
561 stdarg 1.172
562 wingman 1.171 /* init core partyline */
563     core_party_init();
564    
565     /* Load core help */
566     help_load_by_module ("core");
567    
568     /* Put the module directory in the ltdl search path. */
569     if (core_config.module_path)
570     module_add_dir(core_config.module_path);
571    
572     /* Scan the autoload section of config. */
573     config_root = config_get_root("eggdrop");
574     for (i = 0; (entry = config_exists(config_root, "eggdrop", 0, "autoload", 0, "module", i, NULL)); i++) {
575     name = NULL;
576     config_get_str(&name, entry, NULL);
577     module_load(name);
578     }
579     for (i = 0; (entry = config_exists(config_root, "eggdrop", 0, "autoload", 0, "script", i, NULL)); i++) {
580     name = NULL;
581     config_get_str(&name, entry, NULL);
582     script_load(name);
583     }
584    
585     /* notify init listeners */
586 wingman 1.170 check_bind_init();
587 wingman 1.171
588     /* start terminal */
589 stdarg 1.173 if (runmode != RUNMODE_RESTART) {
590     if (backgrd) bg_finish_split();
591     if (terminal_mode) terminal_init();
592     }
593 wingman 1.171
594     return 1;
595     }
596 wingman 1.170
597 wingman 1.171 int core_restart(const char *nick)
598     {
599     putlog(LOG_MISC, "*", "Restarting...");
600     runmode = RUNMODE_RESTART;
601 wingman 1.170 return 1;
602     }
603    
604     int core_shutdown(int how, const char *nick, const char *reason)
605     {
606 wingman 1.171 if (how == SHUTDOWN_SIGTERM)
607     putlog(LOG_MISC, "*", ("Received TERM signal, shutting down."));
608     else if (how != SHUTDOWN_RESTART)
609     putlog(LOG_MISC, "*", ("Shutdown requested by %s: %s"), nick,
610     (reason) ? reason : _("No reason"));
611 wingman 1.170
612 wingman 1.171 /* check how to shut down */
613 wingman 1.170 switch (how) {
614    
615 wingman 1.171 case (SHUTDOWN_RESTART):
616     runmode = RUNMODE_RESTART;
617     break;
618    
619 wingman 1.170 case (SHUTDOWN_GRACEFULL):
620 wingman 1.171 runmode = RUNMODE_SHUTDOWN;
621 wingman 1.170 break;
622    
623 wingman 1.171 /* These two cases are treaded special because something
624     * unusual happened and we're better off if we exit() NOW
625     * than doing a gracefull shutdown with freeing all
626     * memory, closing all sockets, ... */
627 wingman 1.170 case (SHUTDOWN_HARD):
628 wingman 1.171 case (SHUTDOWN_SIGTERM):
629     runmode = RUNMODE_SHUTDOWN;
630     core_shutdown_or_restart();
631 wingman 1.170 exit(0);
632     break;
633 wingman 1.171
634 wingman 1.170 }
635    
636     return BIND_RET_LOG;
637 segfault 1.1 }

webmaster@eggheads.org
ViewVC Help
Powered by ViewVC 1.1.23