ENVIRONMENT settings

Guy Harris guy at auspex.UUCP
Sun Dec 11 15:07:43 AEST 1988


>Nothing to it.  Code your main() as follows:
>
>main (argc, argv, envp)

No, don't do that; see Doug Gwyn's earlier comments for why this is a
Bad Idea.

>Alternatively, you can use the getenv(3) function if you only want to
>access some specific environment variables.

Somewhere between 90% and 99% (maybe even more) of the code that wants
to do something with the environment only wants to access some specific
environment variables, and from the original poster's description it
sounds like that's what he wanted to do as well.



More information about the Comp.unix.questions mailing list