]> git.ipfire.org Git - thirdparty/dhcpcd.git/commitdiff
Improve comment about capturing script output.
authorRoy Marples <roy@marples.name>
Fri, 20 Oct 2023 06:53:20 +0000 (06:53 +0000)
committerRoy Marples <roy@marples.name>
Fri, 20 Oct 2023 06:53:20 +0000 (06:53 +0000)
src/dhcpcd.c

index 52ff1dbb2c0221d3c19060a3788dcfbae809bc2d..71e7d807d01bddca8b83dd05396986bce6749439 100644 (file)
@@ -339,18 +339,14 @@ dhcpcd_daemonised(struct dhcpcd_ctx *ctx)
         * Stop writing to stderr.
         * On the happy path, only the manager process writes to stderr,
         * so this just stops wasting fprintf calls to nowhere.
-        * All other calls - ie errors in privsep processes or script output,
-        * will error when printing.
-        * If we *really* want to fix that, then we need to suck
-        * stderr/stdout in the manager process and either discard it or pass
-        * it to the launcher process and then to stderr.
         */
        logopts &= ~LOGERR_ERR;
        logsetopts(logopts);
 
        /*
-        * We need to do something with stdout/stderr to avoid SIGPIPE
-        * We know that stdin is already mapped to /dev/null
+        * We need to do something with stdout/stderr to avoid SIGPIPE.
+        * We know that stdin is already mapped to /dev/null.
+        * TODO: Capture script output and log it to the logfile and/or syslog.
         */
        dup2(STDIN_FILENO, STDOUT_FILENO);
        dup2(STDIN_FILENO, STDERR_FILENO);