WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-changelog

[Xen-changelog] Make the master fd belonging to the pty pair non-blockin

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] Make the master fd belonging to the pty pair non-blocking. Writes were blocking
From: Xen patchbot -3.0-testing <patchbot-3.0-testing@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 09 Dec 2005 10:06:18 +0000
Delivery-date: Fri, 09 Dec 2005 10:09:27 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID a082a85143ebb816c66620ad6bb020136b494e08
# Parent  d64dbb48684c4a6cc84f778a4faf1ba7fc75b9f0
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@xxxxxxxxxxxxx>

xen-unstable cset: 95584b819b72a87775584323b27731ddab7111f2
committer: Robert Read <robert@xxxxxxxxxxxxx>

diff -r d64dbb48684c -r a082a85143eb tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Tue Dec  6 06:52:15 2005
+++ b/tools/console/daemon/io.c Tue Dec  6 08:40:43 2005
@@ -180,6 +180,9 @@
                free(path);
                if (!success)
                        goto out;
+
+               if (fcntl(master, F_SETFL, O_NONBLOCK) == -1)
+                       goto out;
        }
 
        return master;

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog

<Prev in Thread] Current Thread [Next in Thread>