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

Compare with argc/argv and describe the purpose of environment
---
 man7/environ.7 | 24 ++++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/man7/environ.7 b/man7/environ.7
index 7eeb1fe0e..f9e49a572 100644
--- a/man7/environ.7
+++ b/man7/environ.7
@@ -66,6 +66,30 @@ if the
 feature test macro is defined (see
 .BR feature_test_macros(7)).
 .PP
+At time of execution, a program receives context information by two mechanisms.
+The first way is the program arguments, represented by the
+.I argc
+and
+.I argv
+arguments of the
+.I main
+function. The second is the
+.I environ
+variable as discussed in this manual.
+.PP
+The program arguments are typically used to pass so-called
+command-line arguments specific to a particular use of the program
+being invoked, thus changing the program's behavior for this use case.
+The environment, on the other hand, keeps track of information that is shared 
by many programs and
+rarely changes. For example, a running process can query the value of the
+.B TMDIR
+environment variable to discover a suitable location to store temporary files.
+.PP
+Standard environment variables are used for information about the user' home 
directory,
+current language, etc., and a 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.
+.PP
 This array of strings is made available to the process by the
 .BR exec (3)
 call that started the process.
-- 
2.29.2

Reply via email to