summaryrefslogtreecommitdiffstats
path: root/Doc/lib/libstat.tex
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/lib/libstat.tex')
-rw-r--r--Doc/lib/libstat.tex13
1 files changed, 12 insertions, 1 deletions
diff --git a/Doc/lib/libstat.tex b/Doc/lib/libstat.tex
index 7d19a68..5243a65 100644
--- a/Doc/lib/libstat.tex
+++ b/Doc/lib/libstat.tex
@@ -97,7 +97,8 @@ Group id of the owner.
\end{datadesc}
\begin{datadesc}{ST_SIZE}
-File size in bytes.
+Size in bytes of a plain file; amount of data waiting on some special
+files.
\end{datadesc}
\begin{datadesc}{ST_ATIME}
@@ -112,6 +113,16 @@ Time of last modification.
Time of last status change (see manual pages for details).
\end{datadesc}
+The interpretation of ``file size'' changes according to the file
+type. For plain files this is the size of the file in bytes. For
+FIFOs and sockets under most Unixes (including Linux in particular),
+the ``size'' is the number of bytes waiting to be read at the time of
+the stat(2)/fstat(2)/lstat(2) call; this can sometimes be useful,
+especially for polling one of these special files after a non-blocking
+open. The meaning of the size field for other character and block
+devices varies more, depending on the local implementation of the
+underlying system call.
+
Example:
\begin{verbatim}