Skip to content

Commit f054fe4

Browse files
committed
add unlink reference
it is introduced only couple of pages further
1 parent 580a53c commit f054fe4

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

file-api.tex

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -294,10 +294,10 @@
294294
can \texttt{rm} all hard links to a specific file but if a process has the file
295295
still open, the file data remains on the disk until the process closes the file
296296
or terminates.
297-
\item If a process needs a temporary file, it can create it, \texttt{unlink} it
298-
right away, and work with it using the existing file descriptor. When the file
299-
descriptor is closed (and all of its possible duplicates), the file data is
300-
released.
297+
\item If a process needs a temporary file, it can create it, \texttt{unlink}
298+
(see page \pageref{UNLINK}) it right away, and work with it using the existing
299+
file descriptor. When the file descriptor is closed (and all of its possible
300+
duplicates), the file data is released.
301301
\item Even \texttt{close} may fail. For example, some filesystems may write the
302302
data on file closure (NFS), and if that write fails, \texttt{close} fails.
303303
\item If you forget to close file descriptors when you no longer need them,
@@ -912,7 +912,7 @@
912912
\emph{path2} to file \emph{path1}. Hard links cannot span filesystems (use
913913
\funnm{symlink} for that).
914914
\end{itemize}
915-
\texttt{ int \funnm{unlink}(const char *\emph{path});}
915+
\label{UNLINK} \texttt{ int \funnm{unlink}(const char *\emph{path});}
916916
\begin{itemize}
917917
\item deletes a name (i.e. a directory entry) and after deleting the last link to
918918
the file and after closing the file by all processes, deletes the file data.

0 commit comments

Comments
 (0)