Mercurial > hg > dhcpcd
changeset 5145:c0341181c51f draft
privsep: Redirect to /dev/null unless test or quiet and not debug
Keeps the rtsol like behaviour the same.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Wed, 15 Apr 2020 16:50:32 +0100 |
| parents | dffabac8fd32 |
| children | 389bc505382e |
| files | src/privsep.c |
| diffstat | 1 files changed, 3 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/privsep.c Wed Apr 15 16:50:11 2020 +0100 +++ b/src/privsep.c Wed Apr 15 16:50:32 2020 +0100 @@ -243,7 +243,9 @@ 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); }
