Detailed information regarding Environment Variables in C Programming.
800399Oct 13 2008 — edited Oct 13 2008Hi All,
I have an application which forks a child process ( i.e using vfork() ) this ensure that the child is executed first.Child will be inheriting the Parent Environment Variable by default.
Please note that:-
(i) I dont want child to inherit all the environment variable available to parent.
(ii) I want to reset some values to in the child process (I guess using setenv()).
(iii) I dont want the parent process environment get changed when i modify the child process environment.
As vfork system call is used the child will run in the space address space of parents.
I am not very sure about this, as if I modify the environment variable during run time.Please let me know of if changing the environment variable in child process will be reflected in parent process also.