summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordas <das>2006-08-18 11:23:22 (GMT)
committerdas <das>2006-08-18 11:23:22 (GMT)
commitc8aa816f783a31a2a7a3315813d563c83a73a5d1 (patch)
tree8ac3978c2740341ca4f922b5b8351092d7d9c2c4
parentdaccfbf9d19d8ffcfd4c6106a608bf441713d5ff (diff)
downloadtcl-c8aa816f783a31a2a7a3315813d563c83a73a5d1.zip
tcl-c8aa816f783a31a2a7a3315813d563c83a73a5d1.tar.gz
tcl-c8aa816f783a31a2a7a3315813d563c83a73a5d1.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 ec82bc9..3debe51 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -33,6 +33,10 @@
* generic/tclLink.c (LinkTraceProc): fix 64-bit signed-with-unsigned
comparison warning from gcc4 -Wextra.
+ * 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-17 Don Porter <dgp@users.sourceforge.net>
* generic/tclCompile.c: Revised the new set of expression
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index aacb889..552d819 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.69 2006/03/27 18:08:51 andreas_kupries Exp $
+ * RCS: @(#) $Id: tclUnixChan.c,v 1.70 2006/08/18 11:23:22 das Exp $
*/
#include "tclInt.h" /* Internal definitions for Tcl. */
@@ -3254,6 +3254,9 @@ TclUnixWaitForFile(
if (timeout == 0) {
break;
}
+ if (timeout < 0) {
+ continue;
+ }
/*
* The select returned early, so we need to recompute the timeout.