summaryrefslogtreecommitdiff
path: root/src/dd.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/dd.c
parentb246280c27644ec0f08909d33e652cabb6b16981 (diff)
downloadcoreutils-5d4f8ebdfda9a4aadaeb30aebd34542e55bc13e1.tar.xz
(main, usage): Check for write error to stdout before exiting.
Include "closeout.h".
Diffstat (limited to 'src/dd.c')
-rw-r--r--src/dd.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/dd.c b/src/dd.c
index f71502e62..3c1ff283c 100644
--- a/src/dd.c
+++ b/src/dd.c
@@ -1,5 +1,5 @@
/* dd -- convert a file while copying it.
- Copyright (C) 85, 90, 91, 95, 96, 1997 Free Software Foundation, Inc.
+ Copyright (C) 85, 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
@@ -31,6 +31,7 @@
#include "human.h"
#include "system.h"
+#include "closeout.h"
#include "error.h"
#ifndef SIGINFO
@@ -351,6 +352,7 @@ main (int argc, char **argv)
if (show_version)
{
printf ("dd (%s) %s\n", GNU_PACKAGE, VERSION);
+ close_stdout ();
exit (0);
}
@@ -1137,6 +1139,7 @@ by w for x2, by b for x512, by k for x1024. Each KEYWORD may be:\n\
sync pad every input block with NULs to ibs-size\n\
"));
puts (_("\nReport bugs to <fileutils-bugs@gnu.org>."));
+ close_stdout ();
}
exit (status);
}