mirror of https://github.com/mkerrisk/man-pages
setenv.3: Improve ERRORS section
Add ENOMEM error; improve EINVAL description. Also, make RETURN VALUE section a little more accurate in its mention of errno. Reported-by: Georg Sauthoff <gsauthof@techfak.uni-bielefeld.de> Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
c451761395
commit
2a4b81ffd4
|
@ -32,7 +32,7 @@
|
|||
.\" Noted non-standard behavior of setenv() if name contains '='
|
||||
.\" 2005-08-12, mtk, glibc 2.3.4 fixed the "name contains '='" bug
|
||||
.\"
|
||||
.TH SETENV 3 2007-07-26 "GNU" "Linux Programmer's Manual"
|
||||
.TH SETENV 3 2009-09-20 "GNU" "Linux Programmer's Manual"
|
||||
.SH NAME
|
||||
setenv \- change or add an environment variable
|
||||
.SH SYNOPSIS
|
||||
|
@ -82,8 +82,10 @@ then the function succeeds, and the environment is unchanged.
|
|||
.SH "RETURN VALUE"
|
||||
The
|
||||
.BR setenv ()
|
||||
function returns zero on success, or \-1 if there
|
||||
was insufficient space in the environment.
|
||||
function returns zero on success,
|
||||
or \-1 on error, with
|
||||
.I errno
|
||||
set to indicate the cause of the error.
|
||||
|
||||
The
|
||||
.BR unsetenv ()
|
||||
|
@ -95,7 +97,11 @@ set to indicate the cause of the error.
|
|||
.TP
|
||||
.B EINVAL
|
||||
.I name
|
||||
contained an \(aq=\(aq character.
|
||||
is NULL, points to a string of length 0,
|
||||
or contains an \(aq=\(aq character.
|
||||
.TP
|
||||
.B ENOMEM
|
||||
Insufficient memory to add a new variable to the environment.
|
||||
.SH "CONFORMING TO"
|
||||
4.3BSD, POSIX.1-2001.
|
||||
.SH "NOTES"
|
||||
|
|
Loading…
Reference in New Issue