mirror of
https://github.com/mirror/wget.git
synced 2025-02-27 12:20:20 +08:00
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.
This commit is contained in:
parent
7783870db1
commit
458eb3b8ce
@ -1,10 +1,15 @@
|
|||||||
2008-04-12 Micah Cowan <micah@cowan.name>
|
2008-04-12 Micah Cowan <micah@cowan.name>
|
||||||
|
|
||||||
|
* 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 <rabin@rab.in>
|
||||||
|
|
||||||
* mswindows.c (fake_fork_child): Don't create a logfile for
|
* mswindows.c (fake_fork_child): Don't create a logfile for
|
||||||
--background when --quiet is used, but not --server-response.
|
--background when --quiet is used, but not --server-response.
|
||||||
Don't mention that we're backgrounding if --quiet is used. Based
|
Fixes bug #20917.
|
||||||
on a patch submitted by Rabin Vincent <rabin@rab.in>. Fixes bug
|
|
||||||
#20917.
|
|
||||||
|
|
||||||
* utils.c (fork_to_background): Likewise.
|
* utils.c (fork_to_background): Likewise.
|
||||||
|
|
||||||
|
@ -157,11 +157,7 @@ fake_fork_child (void)
|
|||||||
event = info->event;
|
event = info->event;
|
||||||
|
|
||||||
info->logfile_changed = false;
|
info->logfile_changed = false;
|
||||||
if (opt.quiet && !opt.server_response)
|
if (!opt.lfilename && (!opt.quiet || opt.server_response))
|
||||||
{
|
|
||||||
log_close ();
|
|
||||||
}
|
|
||||||
if (!opt.lfilename)
|
|
||||||
{
|
{
|
||||||
/* See utils:fork_to_background for explanation. */
|
/* See utils:fork_to_background for explanation. */
|
||||||
FILE *new_log_fp = unique_create (DEFAULT_LOGFILE, false, &opt.lfilename);
|
FILE *new_log_fp = unique_create (DEFAULT_LOGFILE, false, &opt.lfilename);
|
||||||
|
@ -301,14 +301,7 @@ fork_to_background (void)
|
|||||||
/* Whether we arrange our own version of opt.lfilename here. */
|
/* Whether we arrange our own version of opt.lfilename here. */
|
||||||
bool logfile_changed = false;
|
bool logfile_changed = false;
|
||||||
|
|
||||||
if (opt.quiet && !opt.server_response)
|
if (!opt.lfilename && (!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)
|
|
||||||
{
|
{
|
||||||
/* We must create the file immediately to avoid either a race
|
/* We must create the file immediately to avoid either a race
|
||||||
condition (which arises from using unique_name and failing to
|
condition (which arises from using unique_name and failing to
|
||||||
|
Loading…
Reference in New Issue
Block a user