readdir.3: ATTRIBUTES: Note functions that are not thread-safe

The data returned by readdir() may be overwritten by subsequent
calls to readdir() for the same directory stream, so it is not
thread-safe.

Signed-off-by: Peng Haitao <penght@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Peng Haitao 2013-03-12 18:43:58 +08:00 committed by Michael Kerrisk
parent 5265a3da3e
commit 83417e6917
1 changed files with 9 additions and 0 deletions

View File

@ -144,6 +144,15 @@ returns 0, and returns NULL in
.TP
.B EBADF
Invalid directory stream descriptor \fIdirp\fP.
.SH ATTRIBUTES
.SS Multithreading (see pthreads(7))
The
.BR readdir ()
function is not thread-safe.
.LP
The
.BR readdir_r ()
function is thread-safe.
.SH CONFORMING TO
SVr4, 4.3BSD, POSIX.1-2001.
.SH NOTES