Merge authors: James Hunt (jamesodhunt) Related merge proposals: https://code.launchpad.net/~jamesodhunt/upstart/log_clear_unflushed-assert-fix/+merge/165637 proposed by: James Hunt (jamesodhunt) review: Approve - Stéphane Graber (stgraber) ------------------------------------------------------------ revno: 1477 [merge] committer: James Hunt <[email protected]> branch nick: upstart timestamp: Tue 2013-05-28 16:12:19 +0100 message: Merge of lp:~jamesodhunt/upstart/log_clear_unflushed-assert-fix. modified: ChangeLog init/log.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 'ChangeLog' --- ChangeLog 2013-05-27 14:29:22 +0000 +++ ChangeLog 2013-05-28 15:12:19 +0000 @@ -5,6 +5,14 @@ can be run as a user without being in user mode. * init/man/init.5: Adjust man page. +2013-05-24 James Hunt <[email protected]> + + * init/log.c: + - log_clear_unflushed(): Expand assertion to handle scenario + where the NihIo is still valid but empty (since the data now + exists on the unflushed list). + - log_read_watch(): Handle EINTR. + 2013-05-24 Marc Deslauriers <[email protected]> * init/job_process.c: Allow environment variables in apparmor === modified file 'init/log.c' --- init/log.c 2013-02-11 16:53:58 +0000 +++ init/log.c 2013-05-24 14:48:33 +0000 @@ -686,6 +686,9 @@ * causes the loop to be exited. */ if (len <= 0) { + if (saved == EINTR) + continue; + /* Job process has ended and we've drained all the data the job * produced, so remote end must have closed. * @@ -810,7 +813,12 @@ * exists. */ nih_assert (log->unflushed->len); - nih_assert (! log->io); + + /* Either the NihIo has been destroyed, or all + * its data has been moved to the unflushed + * buffer. + */ + nih_assert (! log->io || ! log->io->recv_buf->len); } else { /* Parent job itself has ended, but job spawned one or * more processes that are still running and
-- upstart-devel mailing list [email protected] Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/upstart-devel
