]> sjero.net Git - wget/blobdiff - src/log.c
Bump version number in NEWS.
[wget] / src / log.c
index f68e40d211448aee85be258a95c766948ee48ac8..361b45370b0887062fb6f61e4e2ed2c8581c34d8 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -1,6 +1,6 @@
 /* Messages logging.
    Copyright (C) 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-   2007, 2008, 2009 Free Software Foundation, Inc.
+   2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
 
 This file is part of GNU Wget.
 
@@ -34,9 +34,7 @@ as that of the covered work.  */
 #include <string.h>
 #include <stdlib.h>
 #include <stdarg.h>
-#ifdef HAVE_UNISTD_H
-# include <unistd.h>
-#endif
+#include <unistd.h>
 #include <assert.h>
 #include <errno.h>
 
@@ -501,6 +499,9 @@ logprintf (enum log_options o, const char *fmt, ...)
       va_start (args, fmt);
       done = log_vprintf_internal (&lpstate, fmt, args);
       va_end (args);
+
+      if (done && errno == EPIPE)
+        exit (1);
     }
   while (!done);
 }