diff options
author | Andreas Jaeger <aj@suse.de> | 2012-04-08 19:43:41 +0200 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2012-04-08 19:43:41 +0200 |
commit | 6ab0fbfc84836b695413c7d20c2db2d870d2331e (patch) | |
tree | 02f6e57ab7ed84c70edc7696e7617cb89fe9e4c9 /manual/startup.texi | |
parent | 7216225a73dad15756ad8f1dae159b8fbfd9231a (diff) | |
download | glibc-6ab0fbfc84836b695413c7d20c2db2d870d2331e.tar glibc-6ab0fbfc84836b695413c7d20c2db2d870d2331e.tar.gz glibc-6ab0fbfc84836b695413c7d20c2db2d870d2331e.tar.bz2 glibc-6ab0fbfc84836b695413c7d20c2db2d870d2331e.zip |
Document return values of putenv and setenv
[BZ #10153]
* manual/startup.texi (Environment Access): Describe return
value for putenv and setenv.
Diffstat (limited to 'manual/startup.texi')
-rw-r--r-- | manual/startup.texi | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/manual/startup.texi b/manual/startup.texi index 93dca303ca..ed75e7bdc3 100644 --- a/manual/startup.texi +++ b/manual/startup.texi @@ -335,6 +335,9 @@ definition is added to the environment. Otherwise, the @var{string} is interpreted as the name of an environment variable, and any definition for this variable in the environment is removed. +If the function is successful it returns @code{0}. Otherwise the return +value is nonzero and @code{errno} is set to indicate the error. + The difference to the @code{setenv} function is that the exact string given as the parameter @var{string} is put into the environment. If the user should change the string after the @code{putenv} call this will @@ -364,6 +367,10 @@ the old entry is replaced by the new one. Please note that you cannot remove an entry completely using this function. +If the function is successful it returns @code{0}. Otherwise the +environment is unchanged and the return value is @code{-1} and +@code{errno} is set. + This function was originally part of the BSD library but is now part of the Unix standard. @end deftypefun |