[PATCH] Add check for poll error events in monitor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Handle poll errors in the same way as hangup event

* src/qemu/qemu_monitor.c: Handle error events
---
 src/qemu/qemu_monitor.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/src/qemu/qemu_monitor.c b/src/qemu/qemu_monitor.c
index 3026733..0c14277 100644
--- a/src/qemu/qemu_monitor.c
+++ b/src/qemu/qemu_monitor.c
@@ -550,7 +550,8 @@ qemuMonitorIO(int watch, int fd, int events, void *opaque) {
 
         qemuMonitorUpdateWatch(mon);
 
-        if (events & VIR_EVENT_HANDLE_HANGUP) {
+        if (events & (VIR_EVENT_HANDLE_HANGUP |
+                      VIR_EVENT_HANDLE_ERROR)) {
             /* If IO process resulted in EOF & we have a message,
              * then wakeup that waiter */
             if (mon->msg && !mon->msg->finished) {
-- 
1.7.3.4

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]