]> Dogcows Code - chaz/tar/commitdiff
Do not attempt to close stderr after call to close_stdout.
authorSergey Poznyakoff <gray@gnu.org.ua>
Sat, 14 Oct 2006 21:11:43 +0000 (21:11 +0000)
committerSergey Poznyakoff <gray@gnu.org.ua>
Sat, 14 Oct 2006 21:11:43 +0000 (21:11 +0000)
src/tar.c

index 5b68548fde14a72cfffd0bf35115a823c775553b..e0b8ad02bddcd221d080fe71db4707e810b74e6f 100644 (file)
--- a/src/tar.c
+++ b/src/tar.c
@@ -2327,13 +2327,14 @@ main (int argc, char **argv)
   free (archive_name_array);
   name_term ();
 
-  if (stdlis == stdout)
-    close_stdout ();
-
   if (exit_status == TAREXIT_FAILURE)
     error (0, 0, _("Error exit delayed from previous errors"));
-  if (ferror (stderr) || fclose (stderr) != 0)
+
+  if (stdlis == stdout)
+    close_stdout ();
+  else if (ferror (stderr) || fclose (stderr) != 0) 
     exit_status = TAREXIT_FAILURE;
+
   return exit_status;
 }
 
This page took 0.028367 seconds and 4 git commands to generate.