From: Micah Cowan Date: Sun, 13 Apr 2008 06:10:47 +0000 (-0700) Subject: Don't want to close log if an explicit -o was given. Let reopen to /dev/null handle... X-Git-Tag: v1.13~433 X-Git-Url: http://sjero.net/git/?p=wget;a=commitdiff_plain;h=458eb3b8ceba8478efaa856151bdeaa9ec72b8ec Don't want to close log if an explicit -o was given. Let reopen to /dev/null handle any potential logging we'd do in --quiet. --- diff --git a/src/ChangeLog b/src/ChangeLog index 27461263..2a54ffe7 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,10 +1,15 @@ 2008-04-12 Micah Cowan + * mswindows.c (fake_fork_child): Don't mention that we're + backgrounding if --quiet is used. + + * utils.c (fork_to_background): Likewise. + +2008-04-12 Rabin Vincent + * mswindows.c (fake_fork_child): Don't create a logfile for --background when --quiet is used, but not --server-response. - Don't mention that we're backgrounding if --quiet is used. Based - on a patch submitted by Rabin Vincent . Fixes bug - #20917. + Fixes bug #20917. * utils.c (fork_to_background): Likewise. diff --git a/src/mswindows.c b/src/mswindows.c index 5fe764e1..9d5141f1 100644 --- a/src/mswindows.c +++ b/src/mswindows.c @@ -157,11 +157,7 @@ fake_fork_child (void) event = info->event; info->logfile_changed = false; - if (opt.quiet && !opt.server_response) - { - log_close (); - } - if (!opt.lfilename) + if (!opt.lfilename && (!opt.quiet || opt.server_response)) { /* See utils:fork_to_background for explanation. */ FILE *new_log_fp = unique_create (DEFAULT_LOGFILE, false, &opt.lfilename); diff --git a/src/utils.c b/src/utils.c index 4d0560ee..7aac94fd 100644 --- a/src/utils.c +++ b/src/utils.c @@ -301,14 +301,7 @@ fork_to_background (void) /* Whether we arrange our own version of opt.lfilename here. */ bool logfile_changed = false; - if (opt.quiet && !opt.server_response) - { - /* Don't bother with a logfile, there are virtually no logs we - issue in quiet mode. (Server responses in FTP are the - exception, when enabled.) */ - log_close (); - } - if (!opt.lfilename) + if (!opt.lfilename && (!opt.quiet || opt.server_response)) { /* We must create the file immediately to avoid either a race condition (which arises from using unique_name and failing to