]> sjero.net Git - wget/commitdiff
Automated merge.
authorMicah Cowan <micah@cowan.name>
Sun, 13 Apr 2008 06:21:09 +0000 (23:21 -0700)
committerMicah Cowan <micah@cowan.name>
Sun, 13 Apr 2008 06:21:09 +0000 (23:21 -0700)
src/ChangeLog
src/mswindows.c
src/utils.c

index 8865e5dd2f431fbd7281c6f470a233693a434831..871a82e79f6c68b27092360bcf9ef5c48d43e8ef 100644 (file)
@@ -1,10 +1,8 @@
-2007-04-12  Micah Cowan  <micah@cowan.name>
+2008-04-12  Rabin Vincent  <rabin@rab.in>
 
        * 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 <rabin@rab.in>.  Fixes bug
-       #20917.
+       Fixes bug #20917.
 
        * utils.c (fork_to_background): Likewise.
 
index 5fe764e1979e93ec0d50471979cbce7c2b2849a9..2a1469631299a20c70dd6cd77856c78d2df6fc2b 100644 (file)
@@ -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);
@@ -293,8 +289,7 @@ fake_fork (void)
       goto cleanup;
     }
 
-  if (!opt.quiet)
-    printf (_("Continuing in background, pid %lu.\n"), pi.dwProcessId);
+  printf (_("Continuing in background, pid %lu.\n"), pi.dwProcessId);
   if (info->logfile_changed)
     printf (_("Output will be written to `%s'.\n"), info->lfilename);
 
index df4ce20858849a5ba2b3db9ad754a1a97c1d1471..a4928dabacea525261ba3806dd8f34d80f89ad6e 100644 (file)
@@ -322,14 +322,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
@@ -353,8 +346,7 @@ fork_to_background (void)
   else if (pid != 0)
     {
       /* parent, no error */
-      if (!quiet)
-        printf (_("Continuing in background, pid %d.\n"), (int) pid);
+      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()? */