James Hunt has proposed merging lp:~jamesodhunt/upstart/log_clear_unflushed-assert-fix into lp:upstart.
Requested reviews: Upstart Reviewers (upstart-reviewers) For more details, see: https://code.launchpad.net/~jamesodhunt/upstart/log_clear_unflushed-assert-fix/+merge/165637 Fix for a logger issue reported by stgraber. * 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. -- https://code.launchpad.net/~jamesodhunt/upstart/log_clear_unflushed-assert-fix/+merge/165637 Your team Upstart Reviewers is requested to review the proposed merge of lp:~jamesodhunt/upstart/log_clear_unflushed-assert-fix into lp:upstart.
=== modified file 'ChangeLog' --- ChangeLog 2013-05-07 08:59:05 +0000 +++ ChangeLog 2013-05-24 14:52:38 +0000 @@ -1,3 +1,11 @@ +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-07 James Hunt <[email protected]> * util/man/shutdown.8: Specify default action is to bring system === modified file 'init/log.c' --- init/log.c 2013-02-11 16:53:58 +0000 +++ init/log.c 2013-05-24 14:52:38 +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
