[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[PATCH 09/14] Document convention of string in environ

From: Bastien Roucariès <rouca@debian.org>

Document the name=value system and that nul byte is forbidden

Signed-off-by: Bastien Roucariès <rouca@debian.org>
 man7/environ.7 | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/man7/environ.7 b/man7/environ.7
index 2fdb63d68..da540a3e1 100644
--- a/man7/environ.7
+++ b/man7/environ.7
@@ -89,6 +89,15 @@ current language,... An user can define additional variables for other purposes.
 The set of all environment variables that have values is collectively known as
 the process environment or simply the environment.
+By convention, the strings in
+.I environ
+have the form "\fIname\fP\fB=\fP\fIvalue\fP".
+Names of environment variables are case-sensitive and must not contain
+the character "\fB=\fP". The values of environment variables can be anything
+that can be represented as a string. A value and a name must not contain an
+embedded null byte (\(aq\e0\(aq),
+since this is assumed to terminate the string.
 This array of strings is made available to the process by the
 .BR exec (3)
 call that started the process.
@@ -98,9 +107,6 @@ it inherits a
 .I copy
 of its parent's environment.
-By convention the strings in
-.I environ
-have the form "\fIname\fP\fB=\fP\fIvalue\fP".
 Common examples are:

Reply to: