ia64/xen-unstable

changeset 8253:95584b819b72

Make the master fd belonging to the pty pair non-blocking. Writes were blocking
if the console client disconnected before all the data had been written to the
pty, even though the select call had indicated that the fd was previously
writable. Reads have been observed exhibiting similar behaviour too.

Closes bug #380.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
author emellor@leeni.uk.xensource.com
date Tue Dec 06 16:40:43 2005 +0000 (2005-12-06)
parents 1e6fa31fb780
children 06b80b837c92
files tools/console/daemon/io.c
line diff
     1.1 --- a/tools/console/daemon/io.c	Mon Dec 05 15:36:11 2005 +0000
     1.2 +++ b/tools/console/daemon/io.c	Tue Dec 06 16:40:43 2005 +0000
     1.3 @@ -180,6 +180,9 @@ static int domain_create_tty(struct doma
     1.4  		free(path);
     1.5  		if (!success)
     1.6  			goto out;
     1.7 +
     1.8 +		if (fcntl(master, F_SETFL, O_NONBLOCK) == -1)
     1.9 +			goto out;
    1.10  	}
    1.11  
    1.12  	return master;