apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mike Mueller" <m...@subfocal.net>
Subject Getting the current environment (all of it)
Date Mon, 20 Nov 2006 05:51:36 GMT

I'm using the apr_proc_create function to spawn a child process, and
it takes an environment as a parameter.  What I want to do is get my
environment, modify it slightly, and then pass it into the new process
call.  However, there doesn't seem to be a method to access the
environment as a whole (i.e. like "environ" in Linux).  The getenv
function isn't sufficient, because you have to know the names of all
the currently defined environment variables.

Is there a method to get the entire environment via APR?  As of now,
I'm stuck with modifying the parent's environment in place, spawning
the child, and then reverting the parent's environment back to the
original state.  (Haven't tried this yet, but I'm assuming it'll

Any input would be appreciated.


View raw message