mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-03-07 17:28:15 +00: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:
parent
7c0e1a8631
commit
bde9e2c6c0
@ -461,6 +461,8 @@ virLogHandlerDomainLogFileDrain(virLogHandlerLogFilePtr file)
|
|||||||
if (errno == EINTR)
|
if (errno == EINTR)
|
||||||
continue;
|
continue;
|
||||||
return;
|
return;
|
||||||
|
} else if (len == 0) {
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (virRotatingFileWriterAppend(file->file, buf, len) != len)
|
if (virRotatingFileWriterAppend(file->file, buf, len) != len)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user