Module Name:    src
Committed By:   roy
Date:           Wed Apr 15 15:55:24 UTC 2020

Modified Files:
        src/external/bsd/dhcpcd/dist/src: privsep.c

Log Message:
privsep: Redirect to /dev/null unless test or quiet and not debug

Keeps the rtsol like behaviour the same.

Fixes PR bin/55170


To generate a diff of this commit:
cvs rdiff -u -r1.1.1.2 -r1.2 src/external/bsd/dhcpcd/dist/src/privsep.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/external/bsd/dhcpcd/dist/src/privsep.c
diff -u src/external/bsd/dhcpcd/dist/src/privsep.c:1.1.1.2 src/external/bsd/dhcpcd/dist/src/privsep.c:1.2
--- src/external/bsd/dhcpcd/dist/src/privsep.c:1.1.1.2	Mon Apr 13 15:42:21 2020
+++ src/external/bsd/dhcpcd/dist/src/privsep.c	Wed Apr 15 15:55:24 2020
@@ -243,7 +243,9 @@ ps_dostart(struct dhcpcd_ctx *ctx,
 	if (callback(recv_ctx) == -1)
 		goto errexit;
 
-	if (!(ctx->options & (DHCPCD_TEST | DHCPCD_DEBUG))) {
+	if (!(ctx->options & DHCPCD_DEBUG) &&
+	   (!(ctx->options & DHCPCD_TEST) || loggetopts() & LOGERR_QUIET))
+	{
 		freopen(_PATH_DEVNULL, "w", stdout);
 		freopen(_PATH_DEVNULL, "w", stderr);
 	}

Reply via email to