projects
/
platform
/
upstream
/
coreutils.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b2c7c60
)
Arrange to call close_stdout upon exit. Don't close stdout explicitly.
author
Jim Meyering
<jim@meyering.net>
Sat, 20 May 2000 22:04:40 +0000
(22:04 +0000)
committer
Jim Meyering
<jim@meyering.net>
Sat, 20 May 2000 22:04:40 +0000
(22:04 +0000)
src/csplit.c
patch
|
blob
|
history
diff --git
a/src/csplit.c
b/src/csplit.c
index
3be33fa
..
a4fe0e7
100644
(file)
--- a/
src/csplit.c
+++ b/
src/csplit.c
@@
-27,6
+27,7
@@
#include <signal.h>
#include "system.h"
+#include "closeout.h"
#include <regex.h>
@@
-1383,6
+1384,8
@@
main (int argc, char **argv)
bindtextdomain (PACKAGE, LOCALEDIR);
textdomain (PACKAGE);
+ atexit (close_stdout);
+
global_argv = argv;
controls = NULL;
control_used = 0;
@@
-1489,9
+1492,6
@@
main (int argc, char **argv)
cleanup_fatal ();
}
- if (!suppress_count && (ferror (stdout) || fclose (stdout) == EOF))
- error (EXIT_FAILURE, errno, _("write error"));
-
exit (EXIT_SUCCESS);
}