summaryrefslogtreecommitdiffstats
path: root/include/closestream.h
Commit message (Collapse)AuthorAgeFilesLines
* include/closestream: define exit codesKarel Zak2016-08-161-2/+6
| | | | Signed-off-by: Karel Zak <kzak@redhat.com>
* include/closestream: don't wipe errno on EPIPEKarel Zak2014-03-131-1/+2
| | | | | | | ... the code in close_stdout() is sensitive to EPIPE, so wipe errno is close_stream() is probably bad idea. Signed-off-by: Karel Zak <kzak@redhat.com>
* include: add close_fd() for noticing write errors before close()Sami Kerola2013-04-261-0/+19
| | | | | | | | | | | Essentially this helper function is similar to close_stream(), but for file descriptors. When a file descriptors are close()'d status of write is often overlooked. The close_fd() will try to determine what happen to writes with fsync() before closing the file descriptor. Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* build-sys: determine availability of __fpending()Sami Kerola2012-04-231-0/+10
| | | | | | | | Needed to for making Cygwin more possible. Reference: http://comments.gmane.org/gmane.linux.utilities.util-linux-ng/5656 Reported-by: Bernhard Voelker <bernhard.voelker@siemens-enterprise.com> Signed-off-by: Sami Kerola <kerolasa@iki.fi>
* include: add stream error checking facilitySami Kerola2012-04-041-0/+41
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>