diff options
author | Sami Kerola <kerolasa@iki.fi> | 2018-12-27 20:44:52 +0000 |
---|---|---|
committer | Sami Kerola <kerolasa@iki.fi> | 2019-01-01 12:25:40 +0000 |
commit | 4655ecc5105c383669ef529f21f3344f99e7372f (patch) | |
tree | 0b7fddca8063f8db418af3a74a4288b57814ac30 /iputils_common.h | |
parent | 1037b4b890492d2630523fa0eabdf587219bbd14 (diff) | |
download | iputils-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.h | 2 |
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 */ |