diff options
author | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-02-14 20:51:46 +0000 |
---|---|---|
committer | vda <vda@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2007-02-14 20:51:46 +0000 |
commit | 2938e499417275f611fd34f9e22a728a50c3ae93 (patch) | |
tree | b774ded50a81e7af4e1abfeb91abcbd4e0adefb6 /sysklogd | |
parent | 082cb702aed87918673e80af406ea22d95b4464a (diff) | |
download | busybox-w32-2938e499417275f611fd34f9e22a728a50c3ae93.tar.gz busybox-w32-2938e499417275f611fd34f9e22a728a50c3ae93.tar.bz2 busybox-w32-2938e499417275f611fd34f9e22a728a50c3ae93.zip |
syslogd: MARK code is buggy. Disabling it altogether on anti-bloat grounds
git-svn-id: svn://busybox.net/trunk/busybox@17891 69ca8d6d-28ef-0310-b511-8ec308f3f277
Diffstat (limited to 'sysklogd')
-rw-r--r-- | sysklogd/syslogd.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/sysklogd/syslogd.c b/sysklogd/syslogd.c index 53290f1cc..53cb4ba5e 100644 --- a/sysklogd/syslogd.c +++ b/sysklogd/syslogd.c | |||
@@ -28,8 +28,13 @@ | |||
28 | static const char *logFilePath = "/var/log/messages"; | 28 | static const char *logFilePath = "/var/log/messages"; |
29 | static int logFD = -1; | 29 | static int logFD = -1; |
30 | 30 | ||
31 | /* This is not very useful, is bloat, and broken: | ||
32 | * can deadlock if alarmed to make MARK while writing to IPC buffer | ||
33 | * (semaphores are down but do_mark routine tries to down them again) */ | ||
34 | #ifdef SYSLOGD_MARK | ||
31 | /* interval between marks in seconds */ | 35 | /* interval between marks in seconds */ |
32 | static int markInterval = 20 * 60; | 36 | static int markInterval = 20 * 60; |
37 | #endif | ||
33 | 38 | ||
34 | /* level of messages to be locally logged */ | 39 | /* level of messages to be locally logged */ |
35 | static int logLevel = 8; | 40 | static int logLevel = 8; |
@@ -448,6 +453,7 @@ static void quit_signal(int sig) | |||
448 | exit(1); | 453 | exit(1); |
449 | } | 454 | } |
450 | 455 | ||
456 | #ifdef SYSLOGD_MARK | ||
451 | static void do_mark(int sig) | 457 | static void do_mark(int sig) |
452 | { | 458 | { |
453 | if (markInterval) { | 459 | if (markInterval) { |
@@ -455,6 +461,7 @@ static void do_mark(int sig) | |||
455 | alarm(markInterval); | 461 | alarm(markInterval); |
456 | } | 462 | } |
457 | } | 463 | } |
464 | #endif | ||
458 | 465 | ||
459 | static void do_syslogd(void) ATTRIBUTE_NORETURN; | 466 | static void do_syslogd(void) ATTRIBUTE_NORETURN; |
460 | static void do_syslogd(void) | 467 | static void do_syslogd(void) |
@@ -473,8 +480,10 @@ static void do_syslogd(void) | |||
473 | #ifdef SIGCLD | 480 | #ifdef SIGCLD |
474 | signal(SIGCLD, SIG_IGN); | 481 | signal(SIGCLD, SIG_IGN); |
475 | #endif | 482 | #endif |
483 | #ifdef SYSLOGD_MARK | ||
476 | signal(SIGALRM, do_mark); | 484 | signal(SIGALRM, do_mark); |
477 | alarm(markInterval); | 485 | alarm(markInterval); |
486 | #endif | ||
478 | 487 | ||
479 | memset(&sunx, 0, sizeof(sunx)); | 488 | memset(&sunx, 0, sizeof(sunx)); |
480 | sunx.sun_family = AF_UNIX; | 489 | sunx.sun_family = AF_UNIX; |
@@ -558,8 +567,10 @@ int syslogd_main(int argc, char **argv) | |||
558 | /* do normal option parsing */ | 567 | /* do normal option parsing */ |
559 | opt_complementary = "=0"; /* no non-option params */ | 568 | opt_complementary = "=0"; /* no non-option params */ |
560 | getopt32(argc, argv, OPTION_STR, OPTION_PARAM); | 569 | getopt32(argc, argv, OPTION_STR, OPTION_PARAM); |
570 | #ifdef SYSLOGD_MARK | ||
561 | if (option_mask32 & OPT_mark) // -m | 571 | if (option_mask32 & OPT_mark) // -m |
562 | markInterval = xatou_range(opt_m, 0, INT_MAX/60) * 60; | 572 | markInterval = xatou_range(opt_m, 0, INT_MAX/60) * 60; |
573 | #endif | ||
563 | //if (option_mask32 & OPT_nofork) // -n | 574 | //if (option_mask32 & OPT_nofork) // -n |
564 | //if (option_mask32 & OPT_outfile) // -O | 575 | //if (option_mask32 & OPT_outfile) // -O |
565 | if (option_mask32 & OPT_loglevel) // -l | 576 | if (option_mask32 & OPT_loglevel) // -l |