Re: [PATCH V6 3/3] Add support for file descriptor sets

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

 



On 02/15/2013 03:51 PM, Corey Bryant wrote:

+    char *fdsetstr = NULL;
+    int i;
+
+    virBufferAdd(buf, prefix, -1);
+    /*
+     * cmd == NULL hints at hotplugging; use old way of doing things

I assume hotplug will be implemented at a later time by someone.

Yes, this can be done independently.



+            if (!fdsetstr)
+                goto error;
+            virCommandAddArgList(cmd, "-add-fd", fdsetstr, NULL);
+            VIR_FREE(fdsetstr);
+
+            i++;
+        }
+    }
+
+    return 0;
+
+error:

Do fd's need to get cleaned up?  Are we leaking them here?

No, the virCommandTransferFD has put the fd into the virCommand and when that gets aborted due to the error propagation it will close the fd as well.

I will wait for further reviews also regarding the renaming of functions.

--
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]