aboutsummaryrefslogtreecommitdiffstats
path: root/tools/console
diff options
context:
space:
mode:
authorKeir Fraser <keir.fraser@citrix.com>2009-02-20 11:13:11 +0000
committerKeir Fraser <keir.fraser@citrix.com>2009-02-20 11:13:11 +0000
commitfecfa97c11ce8c0f01ef5d37c5079c7eb2e15c78 (patch)
tree03a5ed0a5090f5d4e584d63e4d69a3670a78977a /tools/console
parent3a3034d1015f9360068d8719e22afbe06a2bedbb (diff)
downloadxen-fecfa97c11ce8c0f01ef5d37c5079c7eb2e15c78.tar.gz
xen-fecfa97c11ce8c0f01ef5d37c5079c7eb2e15c78.tar.bz2
xen-fecfa97c11ce8c0f01ef5d37c5079c7eb2e15c78.zip
xenconsoled: make guest console visible on NetBSD dom0
After openpty(), slave_fd must be closed or guest console output goes to the slave while select() in xen console client listens on the master. Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
Diffstat (limited to 'tools/console')
-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;