summaryrefslogtreecommitdiff
path: root/iputils_common.h
diff options
context:
space:
mode:
authorSami Kerola <kerolasa@iki.fi>2018-12-27 20:44:52 +0000
committerSami Kerola <kerolasa@iki.fi>2019-01-01 12:25:40 +0000
commit4655ecc5105c383669ef529f21f3344f99e7372f (patch)
tree0b7fddca8063f8db418af3a74a4288b57814ac30 /iputils_common.h
parent1037b4b890492d2630523fa0eabdf587219bbd14 (diff)
downloadiputils-4655ecc5105c383669ef529f21f3344f99e7372f.tar.gz
libcommon: check standard streams status at exit
Earlier commands happily successed when writing to standard out or error did not work. Following demonstrates old and new behavior of all commands in this project. $ ping -c 1 127.0.0.1 > /dev/full ; echo $? 0 $ ping -c 1 127.0.0.1 > /dev/full ; echo $? ./builddir/ping: write error: No space left on device 1 Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'iputils_common.h')
-rw-r--r--iputils_common.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/iputils_common.h b/iputils_common.h
index e48fa28..304af71 100644
--- a/iputils_common.h
+++ b/iputils_common.h
@@ -22,4 +22,6 @@
extern void error(int status, int errnum, const char *format, ...);
#endif
+extern void close_stdout(void);
+
#endif /* IPUTILS_COMMON_H */