[libvirt] [PATCH v2 13/21] utils: Implement function to pass a buffer to send via a fd to virCommand

Stefan Berger stefanb at linux.ibm.com
Thu Jul 11 11:02:28 UTC 2019


On 7/10/19 4:09 PM, Marc-André Lureau wrote:
> On Wed, Jul 10, 2019 at 10:12 PM Stefan Berger
> <stefanb at linux.vnet.ibm.com> wrote:
>> Implement virCommandSetSendBuffer() that allows the caller to pass a
>> file descriptor and buffer to virCommand. virCommand will write the
>> buffer into the file descriptor. That file descriptor could be the
>> write end of a pipe or one of the file descriptors of a socketpair.
>> The other file descriptor should be passed to the launched process to
>> read the data from.
>>
>> Only implement the function to allocate memory for send buffers
>> and to free them later on.
>>
>> Signed-off-by: Stefan Berger <stefanb at linux.ibm.com>
> that looks fine,
> Reviewed-by: Marc-André Lureau <marcandre.lureau at redhat.com>


I may need to modify this patch here to set the file descriptor's 
O_NONBLOCK flag...





More information about the libvir-list mailing list