aboutsummaryrefslogtreecommitdiffstats
path: root/tools/console/daemon/io.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/console/daemon/io.c')
-rw-r--r--tools/console/daemon/io.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/console/daemon/io.c b/tools/console/daemon/io.c
index 78aea83ed7..19e23f2372 100644
--- a/tools/console/daemon/io.c
+++ b/tools/console/daemon/io.c
@@ -420,6 +420,14 @@ static int domain_create_tty(struct domain *dom)
goto out;
}
+ /* Close the slave fd or the guest console output disappears,
+ * otherwise.
+ */
+ if (dom->slave_fd != -1) {
+ close(dom->slave_fd);
+ dom->slave_fd = -1;
+ }
+
if (dom->use_consolepath) {
success = asprintf(&path, "%s/limit", dom->conspath) !=
-1;