mirror of https://github.com/mkerrisk/man-pages
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:
parent
5265a3da3e
commit
83417e6917
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue