aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2012-01-27 15:40:20 -0700
committerEric Blake <eblake@redhat.com>2012-02-03 10:02:34 -0700
commitc9ace552ebab02695c5da96668612f89d2dc9827 (patch)
tree0744a6251ffc56ab745e4bebc06bb388cac67480 /docs/internals
parentmaint: prune duplicate listings in AUTHORS (diff)
downloadlibvirt-c9ace552ebab02695c5da96668612f89d2dc9827.tar.gz
libvirt-c9ace552ebab02695c5da96668612f89d2dc9827.tar.bz2
libvirt-c9ace552ebab02695c5da96668612f89d2dc9827.zip
command: allow merging stdout and stderr in string capture
Sometimes, its easier to run children with 2>&1 in shell notation, and just deal with stdout and stderr interleaved. This was already possible for fd handling; extend it to also work when doing string capture of a child process. * docs/internals/command.html.in: Document this. * src/util/command.c (virCommandSetErrorBuffer): Likewise. (virCommandRun, virExecWithHook): Implement it. * tests/commandtest.c (test14): Test it. * daemon/remote.c (remoteDispatchAuthPolkit): Use new command feature.
Diffstat (limited to 'docs/internals')
-rw-r--r--docs/internals/command.html.in5
1 files changed, 4 insertions, 1 deletions
diff --git a/docs/internals/command.html.in b/docs/internals/command.html.in
index 7dcf46236..7bb9aa3a0 100644
--- a/docs/internals/command.html.in
+++ b/docs/internals/command.html.in
@@ -373,7 +373,10 @@
allocation of collected information (however, on an
out-of-memory condition, the buffer may still be NULL). The
caller is responsible for freeing registered buffers, since the
- buffers are designed to persist beyond virCommandFree.
+ buffers are designed to persist beyond virCommandFree. It
+ is possible to pass the same pointer to both
+ virCommandSetOutputBuffer and virCommandSetErrorBuffer, in which
+ case the child process interleaves output into a single string.
</p>
<h3><a name="directory">Setting working directory</a></h3>