[Libguestfs] [PATCH] guestfish: Redirect stdout when executing remote commands

Richard W.M. Jones rjones at redhat.com
Mon Sep 14 09:18:02 UTC 2009


On Mon, Sep 14, 2009 at 10:11:30AM +0100, Matthew Booth wrote:
> guestfish --listen necessarily redirects its stdout to /dev/null so
> as not to interfere with eval. The remote protocol doesn't contain
> any other provision for collecting stdout for the caller, so
> executing guestfish --remote will never generate any output.  This
> patch fixes that by forwarding the caller's STDOUT to the listener
> over the unix socket connection. The listener redirects its STDOUT
> to the caller's STDOUT for the duration of the command, then closes
> it again.

ACK.

Rich.

-- 
Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
virt-df lists disk usage of guests without needing to install any
software inside the virtual machine.  Supports Linux and Windows.
http://et.redhat.com/~rjones/virt-df/




More information about the Libguestfs mailing list