Skip to main content
deleted 13 characters in body
Source Link
Caleb
  • 72k
  • 19
  • 203
  • 233

Quoted from Wikipedia:

By default, when a process is created it inherits a duplicate environment of its parent process, except for explicit changes made by the parent when it creates the child. At API level, these changes must be done between fork and exec. Alternatively, from shells such as bash, you can change environment variables for a particular command invocation by indirectly invoking it via env or using the ENVIRONMENT_VARIABLE=VALUE notation.

I understand that "when a process is created it inherits a duplicate environment of its parent process". But I was wondering what the exception -"explicit"explicit changes made by the parent when it creates the child" - really means  ? I don't understand thathow the examples in API and shells are examples of the exception. Thanks!

Quoted from Wikipedia:

By default, when a process is created it inherits a duplicate environment of its parent process, except for explicit changes made by the parent when it creates the child. At API level, these changes must be done between fork and exec. Alternatively, from shells such as bash, you can change environment variables for a particular command invocation by indirectly invoking it via env or using the ENVIRONMENT_VARIABLE=VALUE notation.

I understand that "when a process is created it inherits a duplicate environment of its parent process". But I was wondering what the exception -"explicit changes made by the parent when it creates the child" - really means  ? I don't understand that the examples in API and shells are examples of the exception. Thanks!

Quoted from Wikipedia:

By default, when a process is created it inherits a duplicate environment of its parent process, except for explicit changes made by the parent when it creates the child. At API level, these changes must be done between fork and exec. Alternatively, from shells such as bash, you can change environment variables for a particular command invocation by indirectly invoking it via env or using the ENVIRONMENT_VARIABLE=VALUE notation.

I understand that "when a process is created it inherits a duplicate environment of its parent process". But I was wondering what the exception "explicit changes made by the parent when it creates the child" really means? I don't understand how the examples in API and shells are examples of the exception.

edited title
Link
tshepang
  • 67.7k
  • 94
  • 226
  • 297

Exception of inheirtanceinheritance of environment variables

Tweeted twitter.com/#!/StackUnix/status/97873116306481153
Source Link
Tim
  • 106.9k
  • 234
  • 651
  • 1.1k

Exception of inheirtance of environment variables

Quoted from Wikipedia:

By default, when a process is created it inherits a duplicate environment of its parent process, except for explicit changes made by the parent when it creates the child. At API level, these changes must be done between fork and exec. Alternatively, from shells such as bash, you can change environment variables for a particular command invocation by indirectly invoking it via env or using the ENVIRONMENT_VARIABLE=VALUE notation.

I understand that "when a process is created it inherits a duplicate environment of its parent process". But I was wondering what the exception -"explicit changes made by the parent when it creates the child" - really means ? I don't understand that the examples in API and shells are examples of the exception. Thanks!