close.2: Further clarify how to treat an error return

Further clarify that an error return should be used only
for diagnostic or remedial purposes.

Lifting Linus's words freely from
http://lkml.iu.edu/hypermail/linux/kernel/0207.2/0409.html
Re: close return value (was Re: [ANNOUNCE] Ext3 vs Reiserfs benchmarks)
Date: Wed Jul 17 2002 - 12:43:57 EST

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2016-12-06 16:23:33 +01:00
parent 7fe8ca51a3
commit 1cab7c163d
1 changed files with 4 additions and 1 deletions

View File

@ -103,7 +103,10 @@ loss of data.
This can especially be observed with NFS and with disk quota.
Note, however, that the return value should be used only for
diagnostic purposes.
diagnostic purposes (a warning to the application that there
may still be I/O pending or there may have been failed I/O)
or remedial purposes
(e.g., writing the file once more or creating a backup).
.\" The FreeBSD 11.0 close(2) man page says similar:
.\" In case of any error except EBADF, the supplied file descriptor is
.\" deallocated and therefore is no longer valid.