Skip to Main Content

Infrastructure Software

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Detailed information regarding Environment Variables in C Programming.

800399Oct 13 2008 — edited Oct 13 2008
Hi 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.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 10 2008
Added on Oct 13 2008
2 comments
165 views