guestfish: Redirect stdout when executing remote commands
authorMatthew Booth <mbooth@redhat.com>
Fri, 11 Sep 2009 16:04:13 +0000 (17:04 +0100)
committerMatthew Booth <mbooth@redhat.com>
Mon, 14 Sep 2009 09:37:50 +0000 (10:37 +0100)
commitd5b89d36224b394391af09fba7ed0a7921175610
tree1609dbba7ad513ce79980fcd22c0096d8367e1ae
parent7eda9e6fb2b1f6504167ab650886f5a336fc6919
guestfish: Redirect stdout when executing remote commands

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.
fish/rc.c
guestfish.pod
regressions/test-remote.sh