Mercurial > hg > dhcpcd
diff src/privsep.c @ 5538:fc24946f9b2a draft
dhcpcd: Don't create launcher process if keeping in foreground
There is little point.
| author | Roy Marples <roy@marples.name> |
|---|---|
| date | Wed, 11 Nov 2020 17:44:55 +0000 |
| parents | a0d828e25482 |
| children | 8f7592a6f80d |
line wrap: on
line diff
--- a/src/privsep.c Wed Nov 11 17:41:16 2020 +0000 +++ b/src/privsep.c Wed Nov 11 17:44:55 2020 +0000 @@ -163,12 +163,13 @@ #endif } +#define DHC_NOCHKIO (DHCPCD_STARTED | DHCPCD_DAEMONISE) /* Prohibit writing to files. * 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 || - !ctx->stderr_valid || isatty(STDERR_FILENO) == 1)) + if ((ctx->options & DHC_NOCHKIO) == DHC_NOCHKIO || + (ctx->logfile == NULL && + (!ctx->stderr_valid || isatty(STDERR_FILENO) == 1))) { if (setrlimit(RLIMIT_FSIZE, &rzero) == -1) logerr("setrlimit RLIMIT_FSIZE");
