mirror of https://github.com/mkerrisk/man-pages
close.2: Note that future POSIX plans to require that the FD is closed on error
See http://austingroupbugs.net/view.php?id=529#c1200. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
e8730f0ee7
commit
d24623ee57
14
man2/close.2
14
man2/close.2
|
@ -128,11 +128,19 @@ the steps that may return an error,
|
|||
.\" filp_close()
|
||||
such as flushing data to the filesystem or device,
|
||||
occur only later in the close operation.
|
||||
(Several other implementations similarly always close the file descriptor,
|
||||
.\" FreeBSD documents this explitly. From the look of the source code
|
||||
|
||||
Many other implementations similarly always close the file descriptor
|
||||
.\" FreeBSD documents this explicitly. From the look of the source code
|
||||
.\" SVR4, ancient SunOS, later Solaris, and AIX all do this.
|
||||
(except in the case of
|
||||
.BR EBADF ,
|
||||
meaning that the file descriptor was invalid)
|
||||
even if they subsequently report an error on return from
|
||||
.BR close ().)
|
||||
.BR close ().
|
||||
POSIX.1 is currently silent on this point,
|
||||
but there are plans to mandate this behavior in the next major release
|
||||
.\" Issue 8
|
||||
of the standard
|
||||
|
||||
A careful programmer who wants to know about I/O errors may precede
|
||||
.BR close ()
|
||||
|
|
Loading…
Reference in New Issue