[PATCH] Ensure stream is aborted when exiting console

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

 



From: "Daniel P. Berrange" <berrange@xxxxxxxxxx>

After running 'virsh console' in interactive mode, there was a
missing call to virStreamAbort, which meant the server kept the
stream resources open

* tools/console.c: Abort stream when exiting
---
 tools/console.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/console.c b/tools/console.c
index 171ebc9..82ef537 100644
--- a/tools/console.c
+++ b/tools/console.c
@@ -90,9 +90,11 @@ static void
 virConsoleShutdown(virConsolePtr con)
 {
     con->quit = true;
-    virStreamEventRemoveCallback(con->st);
-    if (con->st)
+    if (con->st) {
+        virStreamEventRemoveCallback(con->st);
+        virStreamAbort(con->st);
         virStreamFree(con->st);
+    }
     if (con->stdinWatch != -1)
         virEventRemoveHandle(con->stdinWatch);
     if (con->stdoutWatch != -1)
-- 
1.7.6

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list


[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]