]> granicus.if.org Git - procps-ng/commit
lib: add fileutils file with stream error checking facility
authorSami Kerola <kerolasa@iki.fi>
Fri, 23 Mar 2012 10:10:04 +0000 (11:10 +0100)
committerSami Kerola <kerolasa@iki.fi>
Fri, 23 Mar 2012 14:57:41 +0000 (15:57 +0100)
commitc7cf98b0e03780f78abe5275c6fb282f71a2369f
tree922269cec4c0e6edb667a49de0e5f659faa6276e
parent1462c4e581caf22b2e7fe155691dfcddcb51b3f7
lib: add fileutils file with stream error checking facility

The close_stream() is copied from GNU lib. Inspiration to do this
is talk by Jim Meyering - Goodbye World! The perils of relying on
output streams in C.

Reference: http://www.irill.org/events/ghm-gnu-hackers-meeting/videos/jim-meyering-goodbye-world-the-perils-of-relying-on-output-streams-in-c
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
include/fileutils.h [new file with mode: 0644]
lib/.gitignore
lib/Makefile.am
lib/fileutils.c [new file with mode: 0644]
testsuite/Makefile.am
testsuite/lib.test/fileutils.exp [new file with mode: 0644]
testsuite/lib.test/fileutils_badfd.sh [new file with mode: 0755]
testsuite/lib.test/fileutils_full.sh [new file with mode: 0755]