]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
Include "exitfail.h".
authorJim Meyering <jim@meyering.net>
Sat, 19 Jul 2003 08:16:38 +0000 (08:16 +0000)
committerJim Meyering <jim@meyering.net>
Sat, 19 Jul 2003 08:16:38 +0000 (08:16 +0000)
(main): Set exit_failure rather than calling close_stdout_set_status.

src/date.c
src/sort.c
src/tty.c

index 10e91914c30244f69eb436f555ca22584e5cc80f..8f52f3708d411c74a18af7426103310e337d0922 100644 (file)
@@ -29,6 +29,7 @@
 #include "argmatch.h"
 #include "closeout.h"
 #include "error.h"
+#include "exitfail.h"
 #include "getdate.h"
 #include "getline.h"
 #include "posixtm.h"
@@ -309,7 +310,7 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  close_stdout_set_status (2);
+  exit_failure = 2;
   atexit (close_stdout);
 
   while ((optc = getopt_long (argc, argv, short_options, long_options, NULL))
index 2d90724ee4c71e8135dc7b7aaed98439025f6c04..631675924974f66a6db6e930648671be6f5c09f0 100644 (file)
@@ -2183,8 +2183,8 @@ main (int argc, char **argv)
 
   atexit (cleanup);
 
+  exit_failure = SORT_FAILURE;
   atexit (close_stdout);
-  close_stdout_set_status (SORT_FAILURE);
 
   hard_LC_COLLATE = hard_locale (LC_COLLATE);
 #if HAVE_NL_LANGINFO
index a14315f5839a3764d77dbd4d970bdf65c4c78ffa..555fe19cfb10dc4cb7d60c3d902d43b8bd68d87e 100644 (file)
--- a/src/tty.c
+++ b/src/tty.c
@@ -29,6 +29,7 @@
 
 #include "system.h"
 #include "closeout.h"
+#include "exitfail.h"
 #include "error.h"
 
 /* The official name of this program (e.g., no `g' prefix).  */
@@ -84,7 +85,7 @@ main (int argc, char **argv)
   bindtextdomain (PACKAGE, LOCALEDIR);
   textdomain (PACKAGE);
 
-  close_stdout_set_status (3);
+  exit_failure = 3;
   atexit (close_stdout);
 
   silent = 0;