]> xenbits.xensource.com Git - people/liuw/libxenctrl-split/libvirt.git/commitdiff
virCommand: Extend debug message for handshake
authorMichal Privoznik <mprivozn@redhat.com>
Wed, 30 May 2012 12:17:26 +0000 (14:17 +0200)
committerMichal Privoznik <mprivozn@redhat.com>
Wed, 30 May 2012 12:47:56 +0000 (14:47 +0200)
Currently, we are logging only one side of pipes we
create in virCommandRequireHandshake(); This is enough
in cases where pipe2() returns two consecutive FDs. However,
it is not guaranteed and it may return any FDs.
Therefore, it's wise to log the other ends as well.

src/util/command.c

index eaa9f167533b30871be20f7a6a5569d73ebf40d9..5b94f1e36d6a8cb46abcf4cf10a8d19464a53795 100644 (file)
@@ -2443,8 +2443,10 @@ void virCommandRequireHandshake(virCommandPtr cmd)
         return;
     }
 
-    VIR_DEBUG("Transfer handshake wait=%d notify=%d",
-              cmd->handshakeWait[1], cmd->handshakeNotify[0]);
+    VIR_DEBUG("Transfer handshake wait=%d notify=%d, "
+              "keep handshake wait=%d notify=%d",
+              cmd->handshakeWait[1], cmd->handshakeNotify[0],
+              cmd->handshakeWait[0], cmd->handshakeNotify[1]);
     virCommandTransferFD(cmd, cmd->handshakeWait[1]);
     virCommandTransferFD(cmd, cmd->handshakeNotify[0]);
     cmd->handshake = true;