<div dir="ltr"><div><div><div><div>Dear Libvirt Developers,<br><br></div>There seems to be a bug or at least a bad behavior in `src/qemu/qemu_monitor.c' lines 683-689 function `qemuMonitorIO':<br><br>            if (qemuMonitorIOWrite(mon) < 0) {<br>                error = true;<br>                if (errno == ECONNRESET)<br>                    hangup = true;<br>            }<br>            events &= ~VIR_EVENT_HANDLE_WRITABLE;<br><br></div>The `qemuMonitorIOWrite' is returning 0 in case 'write' returns EAGAIN thus 'events' is always cleared of `VIR_EVENT_HANDLE_WRITABLE' even in case no message have been sent indeed.<br><br></div>The question is: who is responsible for handling this? It seems like 'errno' is getting overwritten inside all of qemuMonitorJSON* functions so the caller can't rely on it and it needs to be fixed inside the `qemuMonitorIO'.<br><br></div>Pavel<br></div>