]> git.ipfire.org Git - thirdparty/util-linux.git/commit
include: add close_fd() for noticing write errors before close()
authorSami Kerola <kerolasa@iki.fi>
Sat, 13 Apr 2013 19:54:44 +0000 (20:54 +0100)
committerKarel Zak <kzak@redhat.com>
Fri, 26 Apr 2013 11:26:06 +0000 (13:26 +0200)
commitf416563b284a9656ed012f6e078d3498b3403781
tree585728ba935d3d823f645c39aac505a222919651
parent8d21d9ab8ff65decfd03499a29627b6c9ecb21f2
include: add close_fd() for noticing write errors before close()

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>
include/closestream.h