getservent.3: ATTRIBUTES: Note functions that aren't thread-safe

The marking matches glibc marking.
markings of functions in glibc are:
- getservent:    MT-Unsafe race:servent race:serventbuf locale

- getservbyname: MT-Unsafe race:servbyname locale

- getservbyport: MT-Unsafe race:servbyport locale

- setservent:    MT-Unsafe race:servent locale
- endservent:    MT-Unsafe race:servent locale

Signed-off-by: Zeng Linggang <zenglg.jy@cn.fujitsu.com>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Zeng Linggang 2015-06-03 18:16:30 +08:00 committed by Michael Kerrisk
parent bd1725063f
commit 9927122be4
1 changed files with 51 additions and 0 deletions

View File

@ -154,6 +154,57 @@ error occurs or the end of the file is reached.
.TP
.I /etc/services
services database file
.SH ATTRIBUTES
For an explanation of the terms used in this section, see
.BR attributes (7).
.TS
allbox;
lbw15 lb lbw25
l l l.
Interface Attribute Value
T{
.BR getservent ()
T} Thread safety T{
MT-Unsafe race:servent
.br
race:serventbuf locale
T}
T{
.BR getservbyname ()
T} Thread safety T{
MT-Unsafe race:servbyname
.br
locale
T}
T{
.BR getservbyport ()
T} Thread safety T{
MT-Unsafe race:servbyport
.br
locale
T}
T{
.BR setservent (),
.br
.BR endservent ()
T} Thread safety T{
MT-Unsafe race:servent
.br
locale
T}
.TE
In the above table,
.I servent
in
.I race:servent
signifies that if any of the functions
.BR setservent (3),
.BR getservent (3),
or
.BR endservent (3)
are used in parallel in different threads of a program,
then data races could occur.
.SH CONFORMING TO
4.3BSD, POSIX.1-2001.
.SH SEE ALSO