Merge authors:
Stéphane Graber (stgraber)
Related merge proposals:
https://code.launchpad.net/~stgraber/upstart/upstart-inherit-env-no-override/+merge/148362
proposed by: Stéphane Graber (stgraber)
review: Approve - James Hunt (jamesodhunt)
------------------------------------------------------------
revno: 1432 [merge]
committer: James Hunt <[email protected]>
branch nick: upstart
timestamp: Thu 2013-02-14 13:37:04 +0000
message:
* Merge of lp:~stgraber/upstart/upstart-inherit-env-no-override.
modified:
init/job_process.c
--
lp:upstart
https://code.launchpad.net/~upstart-devel/upstart/trunk
Your team Upstart Reviewers is subscribed to branch lp:upstart.
To unsubscribe from this branch go to
https://code.launchpad.net/~upstart-devel/upstart/trunk/+edit-subscription
=== modified file 'init/job_process.c'
--- init/job_process.c 2013-02-11 08:50:24 +0000
+++ init/job_process.c 2013-02-14 02:54:10 +0000
@@ -271,15 +271,14 @@
* so that initctl can have clever behaviour when called within them.
*/
envc = 0;
- if (job->env) {
- env = NIH_MUST (nih_str_array_copy (NULL, &envc, job->env));
- } else {
- env = NIH_MUST (nih_str_array_new (NULL));
- }
+ env = NIH_MUST (nih_str_array_new (NULL));
if (user_mode && inherit_env)
NIH_MUST(environ_append (&env, NULL, &envc, TRUE, environ));
+ if (job->env)
+ NIH_MUST(environ_append (&env, NULL, &envc, TRUE, job->env));
+
if (job->stop_env
&& ((process == PROCESS_PRE_STOP)
|| (process == PROCESS_POST_STOP)))
--
upstart-devel mailing list
[email protected]
Modify settings or unsubscribe at:
https://lists.ubuntu.com/mailman/listinfo/upstart-devel