Question about lifetime of environment variables in job files
Matthias Urlichs
smurf at smurf.noris.de
Tue Nov 4 13:31:12 GMT 2008
Hi,
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()?
Both seems like an ugly hack to me; on the other hand I, can easily see
situations where that would be useful.
Personally, I'd rather use a designated file descriptor, so that a
script could explicitly set an envvar with
echo "env FOO=bar" >&42
That's at least a posixly-clean solution.
--
Matthias Urlichs | {M:U} IT Design @ m-u-it.de | smurf at smurf.noris.de
Disclaimer: The quote was selected randomly. Really. | http://smurf.noris.de
v4sw7$Yhw6+8ln7ma7u7L!wl7DUi2e6t3TMWb8HAGen6g3a4s6Mr1p-3/-6 hackerkey.com
- -
It may be that your whole purpose in life is simply to serve as a
warning to others.
More information about the upstart-devel
mailing list