Running in forground with -g logs to syslog instead of stderr/stdout.
Opened this issue · 0 comments
GoogleCodeExporter commented
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