X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Futils.c;h=df4ce20858849a5ba2b3db9ad754a1a97c1d1471;hp=f4e56d82af72d69c17120cac6728930259571767;hb=1a41bc067c118fe0cbc8a632e9716102bc357b13;hpb=667f4578a570699b69b16defa6f22e26a315c891 diff --git a/src/utils.c b/src/utils.c index f4e56d82..df4ce208 100644 --- a/src/utils.c +++ b/src/utils.c @@ -322,6 +322,13 @@ 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) { /* We must create the file immediately to avoid either a race @@ -346,7 +353,8 @@ fork_to_background (void) else if (pid != 0) { /* parent, no error */ - printf (_("Continuing in background, pid %d.\n"), (int) pid); + if (!quiet) + printf (_("Continuing in background, pid %d.\n"), (int) pid); if (logfile_changed) printf (_("Output will be written to `%s'.\n"), opt.lfilename); exit (0); /* #### should we use _exit()? */