bindresvport.3: ATTRIBUTES: Note function that is thread-safe

Before glibc 2.17, bindresvport() is not thread-safe.
Since glibc 2.17, it is thread-safe, the patch can refer to URL:
http://sourceware.org/git/?p=glibc.git;a=commit;h=f6da27e53695ad1cc0e2a9490358decbbfdff5e5

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-04-24 14:46:12 +08:00 committed by Michael Kerrisk
parent 93a8236f6e
commit 9ed071a41b
1 changed files with 12 additions and 0 deletions

View File

@ -89,6 +89,18 @@ is not NULL and
.I sin->sin_family
is not
.BR AF_INET .
.SH ATTRIBUTES
.SS Multithreading (see pthreads(7))
Before glibc 2.17, the
.BR bindresvport ()
function uses a static variable that is not protected,
so it is not thread-safe.
Since glibc 2.17,
.\" commit f6da27e53695ad1cc0e2a9490358decbbfdff5e5
the
.BR bindresvport ()
function uses a lock to protect static variable, so it is thread-safe.
.SH CONFORMING TO
Not in POSIX.1-2001.
Present on the BSDs, Solaris, and many other systems.