Skip to content

Commit 610aed9

Browse files
committed
on retrying failed close()
1 parent bee7f06 commit 610aed9

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

file-api.tex

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,9 @@
302302
duplicates), the file data is released.
303303
\item Even \texttt{close} may fail. For example, some filesystems may write the
304304
data on file closure (NFS), and if that write fails, \texttt{close} fails.
305+
In such case the error code should be used only for diagnostics. There is not
306+
point in retrying because the descriptor might have been allocated for something
307+
else in the meantime.
305308
\item If you forget to close file descriptors when you no longer need them,
306309
and it is a long living process, a daemon perhaps, depending on the system
307310
configuration you may hit memory starvation as the system memory will be filled

0 commit comments

Comments
 (0)