Otherwise we can miss log tail. Handling hangup in a special way in not nessessary. --- src/logging/log_handler.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/logging/log_handler.c b/src/logging/log_handler.c index cd0ba6e..ca294a0 100644 --- a/src/logging/log_handler.c +++ b/src/logging/log_handler.c @@ -140,7 +140,7 @@ virLogHandlerGetLogFileFromWatch(virLogHandlerPtr handler, static void virLogHandlerDomainLogFileEvent(int watch, int fd, - int events, + int events ATTRIBUTE_UNUSED, void *opaque) { virLogHandlerPtr handler = opaque; @@ -167,12 +167,12 @@ virLogHandlerDomainLogFileEvent(int watch, goto error; } + if (len == 0) + goto error; + if (virRotatingFileWriterAppend(logfile->file, buf, len) != len) goto error; - if (events & VIR_EVENT_HANDLE_HANGUP) - goto error; - virObjectUnlock(handler); return; -- 1.8.3.1 -- libvir-list mailing list libvir-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/libvir-list