getlogin.3: ATTRIBUTES: Note function that is not thread-safe

The function getlogin() is not thread safe.
The function cuserid() is thread-safe with exceptions.

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-05-24 09:08:09 +08:00 committed by Michael Kerrisk
parent d506211293
commit 1454246e94
1 changed files with 14 additions and 0 deletions

View File

@ -137,6 +137,20 @@ password database file
\fI/var/run/utmp\fP
(traditionally \fI/etc/utmp\fP;
some libc versions used \fI/var/adm/utmp\fP)
.SH ATTRIBUTES
.SS Multithreading(see pthreads(7))
The
.BR getlogin ()
function is not thread-safe.
.LP
The
.BR getlogin_r ()
function is thread-safe.
.LP
The
.BR cuserid ()
function is thread-safe with exceptions.
It is not thread-safe if called with a NULL parameter.
.SH CONFORMING TO
.BR getlogin ()
and