]> git.ipfire.org Git - thirdparty/libvirt.git/commit
command: allow merging stdout and stderr in string capture
authorEric Blake <eblake@redhat.com>
Fri, 27 Jan 2012 22:40:20 +0000 (15:40 -0700)
committerEric Blake <eblake@redhat.com>
Fri, 3 Feb 2012 17:02:34 +0000 (10:02 -0700)
commitc9ace552ebab02695c5da96668612f89d2dc9827
tree0744a6251ffc56ab745e4bebc06bb388cac67480
parent9a3fc7f3f73b427ba5259963cdb8f5d362aae398
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.
daemon/remote.c
docs/internals/command.html.in
src/util/command.c
tests/commandtest.c