Boost logo

Boost :

Subject: Re: [boost] Boost.Process article: Tutorial and request for comments
From: Boris Schaeling (boris_at_[hidden])
Date: 2009-04-25 12:21:13

On Sat, 25 Apr 2009 16:13:16 +0200, Phil Endecott
<spam_from_boost_dev_at_[hidden]> wrote:

> [...]Typically I would write:
> fork();
> setenv("PATH","/newpath");
> exec();
> So the new child process gets the parent's environment with any new
> variables added or changed. This seems a lot simpler than copying the
> whole environment.

I also find myself copying the environment variables all the time (and if
it's only for shared libraries to be found by the child process). I'll
change the default behavior.

> [...]The environment is inherited across fork() and all those versions
> of exec() that don't explicitly set a new environment.

Yes. But I'm really trying to find out first what behavior should be
guaranteed on all platforms.

> [...]
>> It's a requirement of Boost.Process. It doesn't need to be an absolute
>> path but can also be a relative path of course.
> Right, so it doesn't need to be an absolute path.

You are right, I should have called it fully specified path.


Boost list run by bdawes at, gregod at, cpdaniel at, john at