1
0
mirror of https://gitlab.com/libvirt/libvirt.git synced 2024-12-23 21:34:54 +03:00

logging: fix endless loop on EOF

On EOF condition we always have POLLHUP event and read returns
0 thus we never break loop in virLogHandlerDomainLogFileDrain.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
This commit is contained in:
Nikolay Shirokovskiy 2020-09-24 15:54:24 +03:00
parent 7c0e1a8631
commit bde9e2c6c0

View File

@ -461,6 +461,8 @@ virLogHandlerDomainLogFileDrain(virLogHandlerLogFilePtr file)
if (errno == EINTR)
continue;
return;
} else if (len == 0) {
return;
}
if (virRotatingFileWriterAppend(file->file, buf, len) != len)