Merge lp:~jamesodhunt/upstart/bug-1302117-remerged into lp:upstart
Proposed by
James Hunt
Status: | Merged |
---|---|
Merged at revision: | 1642 |
Proposed branch: | lp:~jamesodhunt/upstart/bug-1302117-remerged |
Merge into: | lp:upstart |
Diff against target: |
242 lines (+119/-4) 4 files modified
ChangeLog (+14/-0) init/log.c (+12/-0) init/tests/test_job_process.c (+17/-4) util/tests/test_initctl.c (+76/-0) |
To merge this branch: | bzr merge lp:~jamesodhunt/upstart/bug-1302117-remerged |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Dimitri John Ledkov | Approve | ||
Review via email: mp+225177@code.launchpad.net |
Description of the change
Just prior to re-exec Upstart serialises all the internal objects. As a result, log_serialise() gets called for reach job process. If a job process has unflushed data, Upstart attempts to persist it prior to the re-exec. However, the entails calling log_file_open() *in the parent*, which was setting the umask to ensure the log file is created with a known permission.
The fix was to save the umask, set it, write the log file, then restore the umask.
Also, added a new test to avoid regression.
To post a comment you must log in.
This merge proposal is exactly the same as the previous one that was reverted.
The revert reason was failing test_job_process test below:
not ok 139 - with exec call by process after fork job_process. c:8767 (test_handler).
wrong value for rmdir (dirname), expected 0 got -1
at tests/test_
It still fails with this merge proposal.