<div dir="ltr"><div dir="ltr">Hi<br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 22, 2022 at 8:02 PM Michal Privoznik <<a href="mailto:mprivozn@redhat.com">mprivozn@redhat.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">When virCommandSetSendBuffer() is used over a virCommand that is<br>
(or will be) daemonized, then VIR_EXEC_ASYNC_IO the command must<br>
have VIR_EXEC_ASYNC_IO flag set no later than at<br>
virCommandRunAsync() phase so that the thread that's doing IO is<br>
spawned and thus buffers can be sent to the process.<br>
<br>
Signed-off-by: Michal Privoznik <<a href="mailto:mprivozn@redhat.com" target="_blank">mprivozn@redhat.com</a>><br>
---<br>
 src/util/vircommand.c | 3 +++<br>
 1 file changed, 3 insertions(+)<br>
<br>
diff --git a/src/util/vircommand.c b/src/util/vircommand.c<br>
index 41cf552d7b..5f22bd0ac3 100644<br>
--- a/src/util/vircommand.c<br>
+++ b/src/util/vircommand.c<br>
@@ -1719,6 +1719,9 @@ virCommandFreeSendBuffers(virCommand *cmd)<br>
  * @buffer is always stolen regardless of the return value. This function<br>
  * doesn't raise a libvirt error, but rather propagates the error via virCommand.<br>
  * Thus callers don't need to take a special action if -1 is returned.<br>
+ *<br>
+ * When the @cmd is daemonized via virCommandDaemonize() remember to request<br>
+ * asynchronous IO via virCommandDoAsyncIO().<br></blockquote><div><br></div><div>Or else the RunAsync() should return an error, no?<br></div><div><br></div><div>Why not call DoAsyncIO() implicitly in RunAsync() in this case?</div><div><br></div><div>(sorry to repeat maybe my earlier question, trying to be more precise :)<br></div></div><div><br></div><div>thanks</div><div><br></div>-- <br><div dir="ltr" class="gmail_signature">Marc-André Lureau<br></div></div>