diff --git a/ChangeLog b/ChangeLog
index 2f0f9655..ef8bbefe 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2012-06-16  Giuseppe Scrivano  <gscrivano@gnu.org>
+
+	* bootstrap.conf (gnulib_modules): Remove `closeout'.
+	Reported by: Micah Cowan  <micah@cowan.name>.
+
 2012-05-31  Ángel González <keisial@gmail.com>
 
 	* convert.c: fix segfault on wrong urls (bug 36570)
diff --git a/bootstrap.conf b/bootstrap.conf
index a784a906..febd11da 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -33,7 +33,6 @@ bind
 c-ctype
 clock-time
 close
-closeout
 connect
 fcntl
 futimens
diff --git a/src/ChangeLog b/src/ChangeLog
index 3cb29635..bd594522 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,9 @@
+2012-06-16  Giuseppe Scrivano  <gscrivano@gnu.org>
+
+	* main.c: Do not include "stdout.h".
+	(main): Do not register `close_stdout' at exit.
+	Reported by: Micah Cowan  <micah@cowan.name>.
+
 2012-06-09  Giuseppe Scrivano  <gscrivano@gnu.org>
 
 	* main.c (print_help): Move --report-speed under the section
diff --git a/src/main.c b/src/main.c
index 94a33e75..291fe077 100644
--- a/src/main.c
+++ b/src/main.c
@@ -56,7 +56,6 @@ 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>
@@ -982,8 +981,6 @@ 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. */