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

Proposed by James Hunt on 2014-04-10
Status: Rejected
Rejected by: James Hunt on 2014-07-01
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 2014-04-10 Needs Fixing on 2014-06-04
Review via email:

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.
Dimitri John Ledkov (xnox) :
review: Approve
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)

Dimitri John Ledkov (xnox) :
review: Needs Fixing
lp:~jamesodhunt/upstart/bug-1302117 updated on 2014-06-05
1615. By James Hunt on 2014-06-05

* Sync with lp:upstart.

Unmerged revisions

1615. By James Hunt on 2014-06-05

* Sync with lp:upstart.

Preview Diff



People subscribed via source and target branches