I wrote a C program in Linux to set the values of environment variables using setenv, but after execution, when I run set or export, t
Actually every process has its own envp char array. The main function has the following signature:
int main(int argc, char *argv[], char *envp[])
Usually, the envp of the parent inherit to the child, down the parent-child hierarchy. It is by no means communicated upwards in the parent-child hierarchy.