Amit Gourgonda
|
Query on having environment of Parent in child process...
|
Amit Gourgonda
06/20/2008 1:40 AM
post9449
|
Query on having environment of Parent in child process...
Hi,
I am porting an application from Linux to QNX. The application has threads and also does fork+exec. The part of code is
as follows.
setenv(a);
if(fork() == 0)
{
setenv(b);
}
else
{
return;
}
execvp();
I read from the netrino programing document that process having threads fail to fork. And instead of fork+exec I have to
call spawn(). But how do I get the environment of parent and also some environment set after fork() specifically for
the child process?
Thank you.
Amit
|
|
|