The startup code, in addition to passing command-line arguments to main, also gets an environment table from the kernel. The environment table is pointed to by the global variable environ. The type of environ is defined as follows:extern char * * environ;/* This is defined in the Unistd.h header file */=====================================================but in the actual test, the use of the Environ pointer when the error, as shown inso go to the Unistd.h header file to see the original definition of Environ, as shown in As can be seen from the header file, to use the Environ variable, you need to implement the definition of __USE_GNU macro, and the default system is not defined in the macro, so in the source program instead of the __environ variable instead of environ Variable or at the beginning of the program declaration environ this variable can be resolved. ============================================================the method of viewing environment variables using the Environ variable can only view all environment variables at once because we do not know the location of the specific environment variable. If we want to know the value of a specific environment variable, we should use the GETENV function.
Process Environment Detailed (iii)---environment table