]> git.ipfire.org Git - thirdparty/libvirt.git/commitdiff
Add check for poll error events in monitor
authorDaniel P. Berrange <berrange@redhat.com>
Mon, 13 Dec 2010 16:05:41 +0000 (16:05 +0000)
committerDaniel P. Berrange <berrange@redhat.com>
Wed, 26 Jan 2011 14:54:23 +0000 (14:54 +0000)
Handle poll errors in the same way as hangup event

* src/qemu/qemu_monitor.c: Handle error events

src/qemu/qemu_monitor.c

index 302673320b972dfa73d9aa76e5ff9cf92767a764..0c142770d8dbd95a1dd8a9c00c7225b7e864fe62 100644 (file)
@@ -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) {