summaryrefslogtreecommitdiff
path: root/src/mknod.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-01-04 22:45:28 +0000
committerJim Meyering <jim@meyering.net>1998-01-04 22:45:28 +0000
commit5d4f8ebdfda9a4aadaeb30aebd34542e55bc13e1 (patch)
treeebcd4ea3aeb95093c8658d1442ee10612a29f438 /src/mknod.c
parentb246280c27644ec0f08909d33e652cabb6b16981 (diff)
downloadcoreutils-5d4f8ebdfda9a4aadaeb30aebd34542e55bc13e1.tar.xz
(main, usage): Check for write error to stdout before exiting.
Include "closeout.h".
Diffstat (limited to 'src/mknod.c')
-rw-r--r--src/mknod.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/mknod.c b/src/mknod.c
index d2292f7f5..1233a15e6 100644
--- a/src/mknod.c
+++ b/src/mknod.c
@@ -1,5 +1,5 @@
/* mknod -- make special files
- Copyright (C) 90, 91, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 90, 91, 95, 96, 97, 1998 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -34,6 +34,7 @@
#include "system.h"
#include "modechange.h"
+#include "closeout.h"
#include "error.h"
#include "xstrtol.h"
@@ -77,6 +78,7 @@ MAJOR MINOR are forbidden for TYPE p, mandatory otherwise. TYPE may be:\n\
p create a FIFO\n\
"));
puts (_("\nReport bugs to <fileutils-bugs@gnu.org>."));
+ close_stdout ();
}
exit (status);
}
@@ -116,6 +118,7 @@ main (int argc, char **argv)
if (show_version)
{
printf ("mknod (%s) %s\n", GNU_PACKAGE, VERSION);
+ close_stdout ();
exit (0);
}