# HG changeset patch # User Roy Marples # Date 1602348843 -3600 # Node ID cf82a4ba8f27a2381798954acbe2bd08b072727b # Parent 93df3880bcaa5c02d6d21ee57c870f8b164363b8 privsep: We need to ensure stderr is valid before testing if tty diff -r 93df3880bcaa -r cf82a4ba8f27 src/privsep.c --- a/src/privsep.c Sat Oct 10 15:07:38 2020 +0100 +++ b/src/privsep.c Sat Oct 10 17:54:03 2020 +0100 @@ -167,7 +167,8 @@ * Obviously this won't work if we are using a logfile * or redirecting stderr to a file. */ if (ctx->logfile == NULL && - (ctx->options & DHCPCD_STARTED || isatty(STDERR_FILENO) == 1)) + (ctx->options & DHCPCD_STARTED || + (ctx->stderr_valid && isatty(STDERR_FILENO) == 1))) { if (setrlimit(RLIMIT_FSIZE, &rzero) == -1) logerr("setrlimit RLIMIT_FSIZE");