[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: how to set an environment variable from within a makefile
From: |
Michael Ludwig |
Subject: |
Re: how to set an environment variable from within a makefile |
Date: |
Sun, 18 Mar 2012 09:50:55 +0100 |
User-agent: |
Mutt/1.5.20 (2009-12-10) |
Philip Guenther schrieb am 17.03.2012 um 21:04 (-0700):
> In UNIX, when a process creates a child process, the child process
> gets its own environment, separate from that of the process that
> created it. There's nothing the child can do to affect the
> environment of its parent.
>
> Programs that have needed to do this are generally written to output
> to stdout the variable assignments that are desired and then document
> that their caller, the program that invokes them, should capture that
> output and evaluate it. For example, the 'tset' program […]
Another example is ssh-agent :
$ ssh-agent
SSH_AUTH_SOCK=/tmp/ssh-jimlbwZEu764/agent.764; export SSH_AUTH_SOCK;
SSH_AGENT_PID=5064; export SSH_AGENT_PID;
echo Agent pid 5064;
Michael