[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

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

On Fri, Sep 11, 2009 at 05:13:15PM +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.

This is a clever use of sockets.  However I can't accept the patch
unless it contains some tests.  Luckily this should be easy to test by
dropping some shell script(s) into regressions/


Richard Jones, Emerging Technologies, Red Hat  http://et.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://et.redhat.com/~rjones/libguestfs/
See what it can do: http://et.redhat.com/~rjones/libguestfs/recipes.html

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]