X-Git-Url: http://sjero.net/git/?p=wget;a=blobdiff_plain;f=src%2Finit.c;fp=src%2Finit.c;h=4188ca16c1b66795f896baa771a6caa836af2437;hp=40b62b2715c44882603c004c0cb54e9222d55feb;hb=ae0598df9bc459652c167fa9826a72b10b775a7a;hpb=6aa2a7cc9879228cd6c910734beeb8f8688811e9 diff --git a/src/init.c b/src/init.c index 40b62b27..4188ca16 100644 --- a/src/init.c +++ b/src/init.c @@ -30,6 +30,7 @@ shall include the source code for the parts of OpenSSL used as well as that of the covered work. */ #include "wget.h" +#include "exits.h" #include #include @@ -1682,7 +1683,9 @@ cleanup (void) log_close (); if (output_stream) - fclose (output_stream); + if (fclose (output_stream) == EOF) + inform_exit_status (CLOSEFAILED); + /* No need to check for error because Wget flushes its output (and checks for errors) after any data arrives. */