Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 184937
Collapse All | Expand All

(-)src/metalog.c (+13 lines)
Lines 428-433 Link Here
428
    }
428
    }
429
    chmod(sa.sun_path, 0666);
429
    chmod(sa.sun_path, 0666);
430
    sockets[1] = -1;
430
    sockets[1] = -1;
431
432
    if (do_kernel_log) {
431
#ifdef HAVE_KLOGCTL
433
#ifdef HAVE_KLOGCTL
432
    /* larger buffers compared to a pipe() */
434
    /* larger buffers compared to a pipe() */
433
    if(socketpair(AF_UNIX, SOCK_STREAM, 0, fdpipe) < 0) {
435
    if(socketpair(AF_UNIX, SOCK_STREAM, 0, fdpipe) < 0) {
Lines 489-494 Link Here
489
        sockets[1] = klogfd;
491
        sockets[1] = klogfd;
490
    }
492
    }
491
#endif
493
#endif
494
    }
495
    else {
496
      /*
497
       * This will avoid reading from the kernel socket in the process()
498
       * function, which only takes into account valid descriptors.
499
       */
500
      sockets[1] = -1;
501
    }
492
502
493
    /* setup the signal handler pipe */
503
    /* setup the signal handler pipe */
494
    if (socketpair(AF_LOCAL, SOCK_STREAM, 0, dolog_queue) < 0) {
504
    if (socketpair(AF_LOCAL, SOCK_STREAM, 0, dolog_queue) < 0) {
Lines 1436-1441 Link Here
1436
        case 'v' :
1446
        case 'v' :
1437
            ++verbose;
1447
            ++verbose;
1438
            break;
1448
            break;
1449
        case 'N' :
1450
            do_kernel_log = 0;
1451
            break;
1439
        case 'V' :
1452
        case 'V' :
1440
            puts(PACKAGE " version " VERSION);
1453
            puts(PACKAGE " version " VERSION);
1441
            exit(EXIT_SUCCESS);
1454
            exit(EXIT_SUCCESS);
(-)src/metalog_p.h (-1 / +3 lines)
Lines 6-12 Link Here
6
#else
6
#else
7
# define KLOGCTL_OPTIONS ""
7
# define KLOGCTL_OPTIONS ""
8
#endif
8
#endif
9
#define GETOPT_OPTIONS KLOGCTL_OPTIONS "aBC:hp:sVv"
9
#define GETOPT_OPTIONS KLOGCTL_OPTIONS "aBC:hp:sVvN"
10
10
11
static struct option long_options[] = {
11
static struct option long_options[] = {
12
    { "async",        0, NULL, 'a' },
12
    { "async",        0, NULL, 'a' },
Lines 16-21 Link Here
16
#endif
16
#endif
17
    { "configfile",   1, NULL, 'C' },
17
    { "configfile",   1, NULL, 'C' },
18
    { "pidfile",      1, NULL, 'p' },
18
    { "pidfile",      1, NULL, 'p' },
19
    { "no-kernel",    0, NULL, 'N' },
19
    { "synchronous",  0, NULL, 's' },
20
    { "synchronous",  0, NULL, 's' },
20
    { "sync",         0, NULL, 's' },
21
    { "sync",         0, NULL, 's' },
21
    { "verbose",      0, NULL, 'v' },
22
    { "verbose",      0, NULL, 'v' },
Lines 36-41 Link Here
36
static pid_t child;
37
static pid_t child;
37
static sig_atomic_t synchronous = (sig_atomic_t) 1;
38
static sig_atomic_t synchronous = (sig_atomic_t) 1;
38
static int verbose;
39
static int verbose;
40
static int do_kernel_log = 1;
39
static signed char daemonize;
41
static signed char daemonize;
40
static const char *pid_file = DEFAULT_PID_FILE;
42
static const char *pid_file = DEFAULT_PID_FILE;
41
static const char *config_file = DEFAULT_CONFIG_FILE;
43
static const char *config_file = DEFAULT_CONFIG_FILE;

Return to bug 184937