summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormax <max@tclers.tk>2011-08-29 23:24:36 (GMT)
committermax <max@tclers.tk>2011-08-29 23:24:36 (GMT)
commit962035b9e88c81c37b472d73da55dbba9534756a (patch)
tree5f3032d1d13521ec3e1ea518ae2dee08a106b428
parentd65bb6e67d734ac2958cf3ff427488bb8cf04ab8 (diff)
downloadtcl-962035b9e88c81c37b472d73da55dbba9534756a.zip
tcl-962035b9e88c81c37b472d73da55dbba9534756a.tar.gz
tcl-962035b9e88c81c37b472d73da55dbba9534756a.tar.bz2
Put back the check for server sockets (bug #3394732).
-rw-r--r--ChangeLog5
-rw-r--r--unix/tclUnixSock.c9
2 files changed, 14 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 23ee0bf..05f864a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-08-30 Reinhard Max <max@suse.de>
+
+ * unix/tclUnixSock.c (TcpWatchProc): Put back the check for server
+ sockets (bug #3394732).
+
2011-08-29 Don Porter <dgp@users.sourceforge.net>
* generic/tclIORTrans.c: Leak of ReflectedTransformMap.
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index f302b70..35c00c5 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -816,6 +816,15 @@ TcpWatchProc(
* TCL_EXCEPTION. */
{
TcpState *statePtr = (TcpState *) instanceData;
+
+ if (statePtr->acceptProc != NULL) {
+ /*
+ * Make sure we don't mess with server sockets since they will never
+ * be readable or writable at the Tcl level. This keeps Tcl scripts
+ * from interfering with the -accept behavior (bug #3394732).
+ */
+ return;
+ }
if (statePtr->flags & TCP_ASYNC_CONNECT) {
/* Async sockets use a FileHandler internally while connecting, so we