Skip to content
This repository was archived by the owner on Nov 8, 2021. It is now read-only.
This repository was archived by the owner on Nov 8, 2021. It is now read-only.

Running in forground with -g logs to syslog instead of stderr/stdout. #5

Description

@GoogleCodeExporter
What steps will reproduce the problem?
1. Start flowd with -g.
2. Send SIGUSR2 or SIGINFO to the flowd process.

What is the expected output? What do you see instead?
Statistics info should go to stderr but they are logged to stdout.

What version of the product are you using? On what operating system?
0.9.1 on FreeBSD.

Please provide any additional information below.
It seems the loginit has the second two options swapped in privsep.c.  Here is 
a patch.

diff -r 85550dd9b2cc privsep.c
--- a/privsep.c Thu Jun 21 10:30:34 2012 +1000
+++ b/privsep.c Tue Jun 11 16:34:35 2013 -0400
@@ -1141,8 +1141,8 @@
        case -1:
                logerr("fork");
        case 0: /* Child */
-               loginit(PROGNAME, (conf->opts & FLOWD_OPT_VERBOSE),
-                   (conf->opts & FLOWD_OPT_DONT_FORK));
+               loginit(PROGNAME, (conf->opts & FLOWD_OPT_DONT_FORK),
+                   (conf->opts & FLOWD_OPT_VERBOSE));
                close(monitor_to_child_sock);

                if ((conf->opts & FLOWD_OPT_INSECURE) == 0 &&
@@ -1156,8 +1156,8 @@
                setproctitle("net");
                return;
        default: /* Parent */
-               loginit(PROGNAME, (conf->opts & FLOWD_OPT_VERBOSE),
-                   (conf->opts & FLOWD_OPT_DONT_FORK));
+               loginit(PROGNAME, (conf->opts & FLOWD_OPT_DONT_FORK),
+                   (conf->opts & FLOWD_OPT_VERBOSE));
                if ((conf->opts & FLOWD_OPT_DONT_FORK) == 0 &&
                    dup2(devnull, STDERR_FILENO) == -1)
                        logerr("dup2");

Original issue reported on code.google.com by cweim...@gmail.com on 14 Jun 2013 at 5:20

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions