From 15109ebef04d843f2a5ce7b7732cf131d9b59c49 Mon Sep 17 00:00:00 2001 From: Markus Armbruster Date: Tue, 25 Mar 2008 21:39:27 +0100 Subject: [PATCH] Fix empdump to check for export write errors --- src/util/empdump.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/util/empdump.c b/src/util/empdump.c index 48050cbb..9497d01a 100644 --- a/src/util/empdump.c +++ b/src/util/empdump.c @@ -163,6 +163,11 @@ main(int argc, char *argv[]) continue; dump_table(i, human); } + if (fclose(stdout) != 0) { + fprintf(stderr, "%s: error writing export (%s)\n", + argv[0], strerror(errno)); + exit(1); + } } /* write out imported data */