diff options
| author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-06-16 12:40:24 (GMT) |
|---|---|---|
| committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2014-06-16 12:40:24 (GMT) |
| commit | c4af5fcc1b7af6d26c510e8d1457839ae04889a2 (patch) | |
| tree | ed37c4fccb67902f184d9dc63b8123ff2777f2c4 /unix | |
| parent | 7b59202f3a7c458be043af5866873454cc70b0e6 (diff) | |
| parent | 908fc261b62ce47d6f14d0e48bd71c00f4d6f161 (diff) | |
| download | tcl-c4af5fcc1b7af6d26c510e8d1457839ae04889a2.zip tcl-c4af5fcc1b7af6d26c510e8d1457839ae04889a2.tar.gz tcl-c4af5fcc1b7af6d26c510e8d1457839ae04889a2.tar.bz2 | |
merge trunk
Diffstat (limited to 'unix')
| -rw-r--r-- | unix/tclUnixPipe.c | 4 | ||||
| -rw-r--r-- | unix/tclUnixSock.c | 10 |
2 files changed, 6 insertions, 8 deletions
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index ac9ba77..7f2360b 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -1143,7 +1143,7 @@ PipeWatchProc( if (psPtr->inFile) { newmask = mask & (TCL_READABLE | TCL_EXCEPTION); if (newmask) { - Tcl_CreateFileHandler(GetFd(psPtr->inFile), mask, + Tcl_CreateFileHandler(GetFd(psPtr->inFile), newmask, (Tcl_FileProc *) Tcl_NotifyChannel, psPtr->channel); } else { Tcl_DeleteFileHandler(GetFd(psPtr->inFile)); @@ -1152,7 +1152,7 @@ PipeWatchProc( if (psPtr->outFile) { newmask = mask & (TCL_WRITABLE | TCL_EXCEPTION); if (newmask) { - Tcl_CreateFileHandler(GetFd(psPtr->outFile), mask, + Tcl_CreateFileHandler(GetFd(psPtr->outFile), newmask, (Tcl_FileProc *) Tcl_NotifyChannel, psPtr->channel); } else { Tcl_DeleteFileHandler(GetFd(psPtr->outFile)); diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c index 08a14d3..a9323c4 100644 --- a/unix/tclUnixSock.c +++ b/unix/tclUnixSock.c @@ -1024,7 +1024,7 @@ TcpConnect( { socklen_t optlen; int async_callback = statePtr->flags & TCP_ASYNC_PENDING; - int ret = -1, error; + int ret = -1, error = errno; int async = statePtr->flags & TCP_ASYNC_CONNECT; if (async_callback) { @@ -1160,11 +1160,9 @@ out: * the event mechanism one roundtrip through select(). */ - /* Note: disabling this for now as it causes spurious event triggering - * under Linux (see test socket-14.15). */ -#if 0 - Tcl_NotifyChannel(statePtr->channel, TCL_WRITABLE); -#endif + if (statePtr->cachedBlocking == TCL_MODE_NONBLOCKING) { + Tcl_NotifyChannel(statePtr->channel, TCL_WRITABLE); + } } if (error != 0) { /* |
