[libvirt] [PATCH] Initialize vm def monitor fd

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

 



We weren't properly initializing the monitor fd value in the VM
definition structure. If qemu failed to start up, this could lead to
closing stdin, which made all sorts of poo hit the fan. The attached
patch fixes this.

Thanks,
Cole
diff --git a/src/domain_conf.c b/src/domain_conf.c
index e46bf43..622665c 100644
--- a/src/domain_conf.c
+++ b/src/domain_conf.c
@@ -504,6 +504,7 @@ virDomainObjPtr virDomainAssignDef(virConnectPtr conn,
     domain->state = VIR_DOMAIN_SHUTOFF;
     domain->def = def;
     domain->monitor_watch = -1;
+    domain->monitor = -1;
 
     if (VIR_REALLOC_N(doms->objs, doms->count + 1) < 0) {
         virReportOOMError(conn);
--
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]