Merge lp:~jamesodhunt/upstart/bug-1302117 into lp:upstart

Proposed by James Hunt
Status: Rejected
Rejected by: James Hunt
Proposed branch: lp:~jamesodhunt/upstart/bug-1302117
Merge into: lp:upstart
Diff against target: 0 lines
To merge this branch: bzr merge lp:~jamesodhunt/upstart/bug-1302117
Reviewer Review Type Date Requested Status
Dimitri John Ledkov Needs Fixing
Review via email: mp+215173@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.
Revision history for this message
Dimitri John Ledkov (xnox) :
review: Approve
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Strangely this generates empty multi-line test.log for
TEST_FEATURE ("with exec call by process after fork");

But the test doesn't expect any output (all it execs is /bin/true)

Revision history for this message
Dimitri John Ledkov (xnox) :
review: Needs Fixing
lp:~jamesodhunt/upstart/bug-1302117 updated
1615. By James Hunt

* Sync with lp:upstart.

Unmerged revisions

1615. By James Hunt

* Sync with lp:upstart.

Preview Diff

Empty

Subscribers

People subscribed via source and target branches