getlogin.3: RETURN VALUE: mention that 'errno' is set on error

Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2013-04-19 09:03:39 +02:00
parent 1790ea4423
commit c0ebcc7abd
1 changed files with 4 additions and 2 deletions

View File

@ -25,7 +25,7 @@
.\" Changed Tue Sep 19 01:49:29 1995, aeb: moved from man2 to man3
.\" added ref to /etc/utmp, added BUGS section, etc.
.\" modified 2003 Walter Harms, aeb - added getlogin_r, note on stdin use
.TH GETLOGIN 3 2008-06-29 "GNU" "Linux Programmer's Manual"
.TH GETLOGIN 3 2013-04-19 "GNU" "Linux Programmer's Manual"
.SH NAME
getlogin, getlogin_r, cuserid \- get username
.SH SYNOPSIS
@ -95,7 +95,9 @@ precisely because the user can set \fBLOGNAME\fP arbitrarily.
.SH RETURN VALUE
.BR getlogin ()
returns a pointer to the username when successful,
and NULL on failure.
and NULL on failure, with
.I errno
set to indicate the cause of the error.
.BR getlogin_r ()
returns 0 when successful, and nonzero on failure.
.SH ERRORS