On Tue, 2008-11-04 at 14:31 +0100, Matthias Urlichs wrote:

> Scott James Remnant:
> > The idea would be that when the pre-start script exits, we pick up the
> > environment table and add that back to the job -- this may require some
> > changes to the way init gets child signals or something though.
> > 
> Umm, so you want to either auto-add a "printenv" at the end of that
> script, or use ptrace to stop it before running _exit() / exit_group()?
> 
Right, it's a bit tricky - the only real way to extract the "exported
environment" of a process is to make it fork a child, or exec another
binary.

I had a crazy idea of grabbing the child on exit, and then turning that
into an exec() call which fed back the information into Upstart.

An initctl "change the environment" command is far more likely as the
ultimate realisation here:

        initctl saveenv

Maybe

Scott
-- 
Have you ever, ever felt like this?
Had strange things happen?  Are you going round the twist?

Attachment: signature.asc
Description: This is a digitally signed message part

-- 
upstart-devel mailing list
upstart-devel@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/upstart-devel

Reply via email to