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

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



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.


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