summaryrefslogtreecommitdiffstats
path: root/man3/putenv.3
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:41:07 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 19:41:07 +0000
commit3af6d22bb3850ab2bac67287e3a3d3b0e32868e5 (patch)
tree3ee7a3ec64525911fa865bb984c86d997d855527 /man3/putenv.3
parentAdding debian version 6.05.01-1. (diff)
downloadmanpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.tar.xz
manpages-3af6d22bb3850ab2bac67287e3a3d3b0e32868e5.zip
Merging upstream version 6.7.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--man3/putenv.325
1 files changed, 12 insertions, 13 deletions
diff --git a/man3/putenv.3 b/man3/putenv.3
index da15b2e..c63d5e4 100644
--- a/man3/putenv.3
+++ b/man3/putenv.3
@@ -14,7 +14,7 @@
.\" Modified Mon Oct 11 11:11:11 1999 by Andries Brouwer (aeb@cwi.nl)
.\" Modified Wed Nov 10 00:02:26 1999 by Andries Brouwer (aeb@cwi.nl)
.\" Modified Sun May 20 22:17:20 2001 by Andries Brouwer (aeb@cwi.nl)
-.TH putenv 3 2023-07-20 "Linux man-pages 6.05.01"
+.TH putenv 3 2023-10-31 "Linux man-pages 6.7"
.SH NAME
putenv \- change or add an environment variable
.SH LIBRARY
@@ -23,16 +23,16 @@ Standard C library
.SH SYNOPSIS
.nf
.B #include <stdlib.h>
-.PP
+.P
.BI "int putenv(char *" string );
.\" Not: const char *
.fi
-.PP
+.P
.RS -4
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.RE
-.PP
+.P
.BR putenv ():
.nf
_XOPEN_SOURCE
@@ -77,17 +77,16 @@ T{
.BR putenv ()
T} Thread safety MT-Unsafe const:env
.TE
-.sp 1
.SH STANDARDS
POSIX.1-2008.
.SH HISTORY
POSIX.1-2001, SVr2, 4.3BSD-Reno.
-.PP
+.P
The
.BR putenv ()
function is not required to be reentrant, and the
one in glibc 2.0 is not, but the glibc 2.1 version is.
-.\" .LP
+.\" .P
.\" Description for libc4, libc5, glibc:
.\" If the argument \fIstring\fP is of the form \fIname\fP,
.\" and does not contain an \[aq]=\[aq] character, then the variable \fIname\fP
@@ -100,7 +99,7 @@ one in glibc 2.0 is not, but the glibc 2.1 version is.
.\" then it will be freed.
.\" In no case will the old storage associated
.\" to the environment variable itself be freed.
-.PP
+.P
Since glibc 2.1.2, the glibc implementation conforms to SUSv2:
the pointer \fIstring\fP given to
.BR putenv ()
@@ -116,23 +115,23 @@ However, from glibc 2.0 to glibc 2.1.1, it differs:
a copy of the string is used.
On the one hand this causes a memory leak, and on the other hand
it violates SUSv2.
-.PP
+.P
The 4.3BSD-Reno version, like glibc 2.0, uses a copy;
this is fixed in all modern BSDs.
-.PP
+.P
SUSv2 removes the \fIconst\fP from the prototype, and so does glibc 2.1.3.
-.PP
+.P
The GNU C library implementation provides a nonstandard extension.
If
.I string
does not include an equal sign:
-.PP
+.P
.in +4n
.EX
putenv("NAME");
.EE
.in
-.PP
+.P
then the named variable is removed from the caller's environment.
.SH SEE ALSO
.BR clearenv (3),