Hello,
when quiet option is provided and wget runs in background an empty log file
is created. I think this file is obsolete because quiet option prevents any
log to be written into that file. This problem is caused by redirection of
logs. Wget checks only if it is running in background and then redirects
logs to default log file and initialization of logs creates the file which
stays empty.This problem can be fixed with simple patch which i am
attaching.
Fedora bug: https://bugzilla.redhat.com/show_bug.cgi?id=1484411
commit 23c36d50f1975ce68a5acf176113e3c7edadf46e
Author: Tomas Korbar <tkor...@redhat.com>
Date:   Mon Aug 27 13:03:37 2018 +0200

    Fix quiet option when wget runs in background

diff --git a/src/log.c b/src/log.c
index d879dff..e8cca2f 100644
--- a/src/log.c
+++ b/src/log.c
@@ -974,7 +974,7 @@ check_redirect_output (void)
     {
       pid_t foreground_pgrp = tcgetpgrp (STDIN_FILENO);
 
-      if (foreground_pgrp != -1 && foreground_pgrp != getpgrp ())
+      if (foreground_pgrp != -1 && foreground_pgrp != getpgrp () && !opt.quiet)
         {
           /* Process backgrounded */
           redirect_output (true,NULL);

Reply via email to