next up previous
Next: Running Other Programs from Up: Application layer issues Previous: Other Pitfalls with Command

Passing Arguments through Environment Variables

One technique for passing arguments to external programs is through environment variables. For instance, this is used by the CGI mechanism.

However, there is one serious gotcha with this approach you need to be aware of.

XXX: Mention LD variables (telnetd login bug and others)

Therefore, when you pass data through environment variables, either use fixed variable names, or if you need to support a flexible naming scheme, use a common prefix that doesn't collide with system variables. For example, the CGI mechanism prefixes all variables with HTTP_ for this reason.



Olaf Kirch 2002-01-16