Merge lp:~stgraber/upstart/upstart-shell-paths into lp:upstart
Status: | Merged |
---|---|
Merged at revision: | 1408 |
Proposed branch: | lp:~stgraber/upstart/upstart-shell-paths |
Merge into: | lp:upstart |
Diff against target: |
65 lines (+18/-3) 2 files modified
init/job_process.c (+10/-3) init/tests/test_job_process.c (+8/-0) |
To merge this branch: | bzr merge lp:~stgraber/upstart/upstart-shell-paths |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
James Hunt | Approve | ||
Review via email: mp+140175@code.launchpad.net |
Description of the change
We recently noticed a bunch of upstart build failures caused by
test_job_process reporting that pWD=/ was added to the environment which
wasn't quite expected.
This was eventually tracked down to upstart calling the command through a
shell if any of the usual shell special characters are found (like ~ in this
case).
This branch does two things:
- Changes job_process.c slightly to explicitly set ->script = TRUE when
upstart decides that the command needs to be run under a shell.
- Updates the tests to check for the post-run value of ->script and allow
for PWD=/ in such case.
PWD will always be / if present as the shell itself is provided without any
environment and so can't inherit PWD.
This is bug 1086474.
LGTM. Merged.