ia64/xen-unstable

changeset 19238:b749d0aba17f

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>
author Keir Fraser <keir.fraser@citrix.com>
date Fri Feb 20 11:13:11 2009 +0000 (2009-02-20)
parents 07e65892fc8e
children f8187a343ad2
files tools/console/daemon/io.c
line diff
     1.1 --- a/tools/console/daemon/io.c	Fri Feb 20 11:11:40 2009 +0000
     1.2 +++ b/tools/console/daemon/io.c	Fri Feb 20 11:13:11 2009 +0000
     1.3 @@ -420,6 +420,14 @@ static int domain_create_tty(struct doma
     1.4  		goto out;
     1.5  	}
     1.6  
     1.7 +	/* Close the slave fd or the guest console output disappears,
     1.8 +	 * otherwise.
     1.9 +	 */
    1.10 +	if (dom->slave_fd != -1) {
    1.11 +		close(dom->slave_fd);
    1.12 +		dom->slave_fd = -1;
    1.13 +	}
    1.14 +
    1.15  	if (dom->use_consolepath) {
    1.16  		success = asprintf(&path, "%s/limit", dom->conspath) !=
    1.17  			-1;