]> sjero.net Git - wget/commitdiff
Report stdout close errors.
authorGiuseppe Scrivano <gscrivano@gnu.org>
Sun, 26 Feb 2012 01:41:07 +0000 (02:41 +0100)
committerGiuseppe Scrivano <gscrivano@gnu.org>
Sun, 26 Feb 2012 01:41:07 +0000 (02:41 +0100)
ChangeLog
NEWS
bootstrap.conf
src/ChangeLog
src/main.c

index a391a78686b370bce71002d04b3495472f6663c6..39cfd525f4558da67623cffb46961cd735be2b73 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2012-02-26  Giuseppe Scrivano  <gscrivano@gnu.org>
+
+       * bootstrap.conf (gnulib_modules): Add module `closeout'.
+
 2012-01-09  Gijs van Tulder  <gvtulder@gmail.com>
 
        * configure.ac: Always try to use libz, even without SSL.
diff --git a/NEWS b/NEWS
index 3a6aca0d50ba3803b11b4bfc3e21c5cd3eb7de73..5c8184b44fa38debbc76053cc7bb1e2b95e5121a 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,7 +1,7 @@
 GNU Wget NEWS -- history of user-visible changes.
 
 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
-2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation, Inc.
 See the end for copying conditions.
 
 Please send GNU Wget bug reports to <bug-wget@gnu.org>.
@@ -18,6 +18,8 @@ Please send GNU Wget bug reports to <bug-wget@gnu.org>.
 ** Autoreconf works again for distributed tarballs.
 
 ** Print some diagnostic messages to stderr not to stdout.
+
+** Report stdout close errors.
 \f
 * Changes in Wget 1.13.4
 
index 6473cbba1127b68ac33bab65054f127059d29fda..fff26a6dfe99705d14f8817cf2a6315565065049 100644 (file)
@@ -1,5 +1,5 @@
 # bootstrap.conf - Bootstrap configuration.
-# Copyright (C) 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
 # Inc.
 #
 # This file is part of GNU Wget.
@@ -33,6 +33,7 @@ bind
 c-ctype
 clock-time
 close
+closeout
 connect
 fcntl
 futimens
index 9f221012aedbefbc99e8f75f41e987da7623bf6e..caebc5e4c040a33b5d0eb4c37cbaff1a11bc2a88 100644 (file)
@@ -1,3 +1,8 @@
+2012-02-26  Giuseppe Scrivano  <gscrivano@gnu.org>
+
+       * main.c: Include "closeout.h"
+       (main): Register close_stdout at exit.
+
 2012-02-01  Gijs van Tulder  <gvtulder@gmail.com>
 
        * warc.c: Fix large file support with ftello, fseeko.
index 352715a0079187686bc7cf45649f05627bb459ee..3e731e9d02924bf9dda268ad54d75f9f8193767f 100644 (file)
@@ -1,6 +1,6 @@
 /* Command line parsing.
    Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-   2005, 2006, 2007, 2008, 2009, 2010, 2011 Free Software Foundation,
+   2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012 Free Software Foundation,
    Inc.
 
 This file is part of GNU Wget.
@@ -56,7 +56,7 @@ as that of the covered work.  */
 #include "http.h"               /* for save_cookies */
 #include "ptimer.h"
 #include "warc.h"
-
+#include "closeout.h"
 #include <getopt.h>
 #include <getpass.h>
 #include <quote.h>
@@ -966,6 +966,8 @@ main (int argc, char **argv)
 
   i18n_initialize ();
 
+  atexit (close_stdout);
+
   /* Construct the name of the executable, without the directory part.  */
 #ifdef __VMS
   /* On VMS, lose the "dev:[dir]" prefix and the ".EXE;nnn" suffix. */