summaryrefslogtreecommitdiffstats
path: root/fish/rc.c
diff options
context:
space:
mode:
authorRichard W.M. Jones <rjones@redhat.com>2012-03-12 15:14:54 +0000
committerRichard W.M. Jones <rjones@redhat.com>2012-03-12 15:21:35 +0000
commit17182af3a6de8e3e94e0a914416c54f09bb74007 (patch)
tree56fe3b0684849f169eb6405956f6e3c1a05d829b /fish/rc.c
parentf7c744bbf819b5984cbd3569d35d82a0451996b3 (diff)
downloadlibguestfs-17182af3a6de8e3e94e0a914416c54f09bb74007.tar.gz
libguestfs-17182af3a6de8e3e94e0a914416c54f09bb74007.tar.xz
libguestfs-17182af3a6de8e3e94e0a914416c54f09bb74007.zip
fish: remote: Output from close event now passed over stdout (RHBZ#802389).
Diffstat (limited to 'fish/rc.c')
-rw-r--r--fish/rc.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/fish/rc.c b/fish/rc.c
index aa12820a..4c119f7b 100644
--- a/fish/rc.c
+++ b/fish/rc.c
@@ -291,6 +291,15 @@ rc_listen (void)
xdr_free ((xdrproc_t) xdr_guestfish_call, (char *) &call);
+ /* RHBZ#802389: If the command is quit, close the handle right
+ * away. Note that the main while loop will exit preventing
+ * 'g' from being reused.
+ */
+ if (quit) {
+ guestfs_close (g);
+ g = NULL;
+ }
+
/* Send the reply. */
xdrstdio_create (&xdr2, fp, XDR_ENCODE);
(void) xdr_guestfish_reply (&xdr2, &reply);