summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordas <das>2006-08-18 11:23:31 (GMT)
committerdas <das>2006-08-18 11:23:31 (GMT)
commitc925813266e101493b3ca5049dbb21f4c1764d8b (patch)
treedeed8c8f9e32409fb4215df0ce36cdf36ed2cfc9
parent14bd76d3ec59b713ec76126253b3ed6c91ffc64a (diff)
downloadtcl-c925813266e101493b3ca5049dbb21f4c1764d8b.zip
tcl-c925813266e101493b3ca5049dbb21f4c1764d8b.tar.gz
tcl-c925813266e101493b3ca5049dbb21f4c1764d8b.tar.bz2
* unix/tclUnixChan.c (TclUnixWaitForFile): with timeout < 0, if select()
returns early (e.g. due to a signal), call it again instead of returning a timeout result. Fixes intermittent event-13.8 failures.
-rw-r--r--ChangeLog4
-rw-r--r--unix/tclUnixChan.c5
2 files changed, 8 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 1bc4099..281e0c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,10 @@
* macosx/README: updates for x86_64 support and Xcode 2.3.
+ * unix/tclUnixChan.c (TclUnixWaitForFile): with timeout < 0, if select()
+ returns early (e.g. due to a signal), call it again instead of returning
+ a timeout result. Fixes intermittent event-13.8 failures.
+
2006-08-09 Don Porter <dgp@users.sourceforge.net>
* generic/tclEncoding.c: Replace buffer copy in for loop
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index 1508b39..2be6cbc 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -10,7 +10,7 @@
* See the file "license.terms" for information on usage and redistribution
* of this file, and for a DISCLAIMER OF ALL WARRANTIES.
*
- * RCS: @(#) $Id: tclUnixChan.c,v 1.42.2.6 2005/11/27 02:34:42 das Exp $
+ * RCS: @(#) $Id: tclUnixChan.c,v 1.42.2.7 2006/08/18 11:23:31 das Exp $
*/
#include "tclInt.h" /* Internal definitions for Tcl. */
@@ -3282,6 +3282,9 @@ TclUnixWaitForFile(fd, mask, timeout)
if (timeout == 0) {
break;
}
+ if (timeout < 0) {
+ continue;
+ }
/*
* The select returned early, so we need to recompute the timeout.