]> git.ipfire.org Git - thirdparty/libvirt.git/commit
logging: read all bytes on EOF in event handler
authorNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Thu, 24 Sep 2020 12:47:09 +0000 (15:47 +0300)
committerNikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Fri, 2 Oct 2020 06:15:23 +0000 (09:15 +0300)
commit7c0e1a8631773788a96702252931541290288ef6
treea02ce8bdf2821912c456c824e2f2b09eb3f05e5e
parentc6c23415706ee303a9fbeee5326a4e504645fe3e
logging: read all bytes on EOF in event handler

If writing side writes enough bytes to the pipe and closes writing
end then we got both VIR_EVENT_HANDLE_HANGUP and VIR_EVENT_HANDLE_READ
in handler. Currently in this situation handler reads 1024 bytes
and finish reading leaving unread data in pipe.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
src/logging/log_handler.c