search for: vir_event_handle_hangup

Displaying 2 results from an estimated 2 matches for "vir_event_handle_hangup".

2013 Sep 18
2
Trouble using virStream with callbacks
...virStreamPtr stream = *((virStreamPtr*)(opaque)); if (events & VIR_EVENT_HANDLE_READABLE) { char buf[1024]; int bytes_read = read(fd, buf, sizeof(buf)); if (bytes_read > 0) virStreamSend(stream, buf, bytes_read); } if (events & (VIR_EVENT_HANDLE_ERROR|VIR_EVENT_HANDLE_HANGUP)) { stream_active = 0; } return; } void stream_to_stdout(virStreamPtr stream, int events, void *opaque) { if (events & VIR_EVENT_HANDLE_READABLE) { char buf[1024]; int bytes_read = virStreamRecv(stream, buf, sizeof(buf)); if (bytes_read > 0) { fwrit...
2019 Aug 05
2
Vm in state "in shutdown"
...ch is zero, then event would’t be update. But 'qemuMonitorSend' would still wait on mon->notify. So the remoteDispatchDomainMemoryStats job is blocked, and then the stop job blocked too. 618 static void 619 qemuMonitorUpdateWatch(qemuMonitorPtr mon) 620 { 621 int events = 622 VIR_EVENT_HANDLE_HANGUP | 623 VIR_EVENT_HANDLE_ERROR; 624 625 if (!mon->watch) 626 return; 627 628 if (mon->lastError.code == VIR_ERR_OK) { 629 events |= VIR_EVENT_HANDLE_READABLE; 630 631 if ((mon->msg && mon->msg->txOffset < mon->msg->txLength) &amp...