Updated SC2097 (markdown)

koalaman
2014-03-03 19:21:11 -08:00
parent 40a3204ca8
commit c8f327e2e0

@@ -18,7 +18,7 @@ To prevent setting the variable, this can also be done in a subshell:
### Rationale: ### Rationale:
In `name=World cmd "$name"`, `name=World` is passed in as part of the environment to `cmd` (i.e., in the `envp` parameter to [man 2 execve](http://linux.die.net/man/2/execve)). This means that `cmd` and its children will see the parameter, but no other processes will. In `name=World cmd "$name"`, `name=World` is passed in as part of the environment to `cmd` (i.e., in the `envp` parameter to [execve(2)](http://linux.die.net/man/2/execve)). This means that `cmd` and its children will see the parameter, but no other processes will.
However, `"$name"` is not expanded by `cmd`. `"$name"` is expanded by the shell before `cmd` is ever executed, and thus it will not use the new value. However, `"$name"` is not expanded by `cmd`. `"$name"` is expanded by the shell before `cmd` is ever executed, and thus it will not use the new value.