Mailing List Archive

Make the master fd belonging to the pty pair non-blocking. Writes were blocking
# HG changeset patch
# User emellor@leeni.uk.xensource.com
# Node ID 95584b819b72a87775584323b27731ddab7111f2
# Parent 1e6fa31fb7801502e0d517d9f30e4cef96d1d5a1
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>

diff -r 1e6fa31fb780 -r 95584b819b72 tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Mon Dec 5 15:36:11 2005
+++ b/tools/console/daemon/io.c Tue Dec 6 16: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@lists.xensource.com
http://lists.xensource.com/xen-changelog
Make the master fd belonging to the pty pair non-blocking. Writes were blocking [ In reply to ]
# HG changeset patch
# User emellor@leeni.uk.xensource.com
# 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@xensource.com>

xen-unstable cset: 95584b819b72a87775584323b27731ddab7111f2
committer: Robert Read <robert@xensource.com>

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@lists.xensource.com
http://lists.xensource.com/xen-changelog