summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* socket -async and gets/puts stall on windows (Ticket [336441ed59]) win_sock_async_connect_race_fixandreask2014-03-081-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a change for a problem which is pretty much impossible to test for in the testsuite, as it is a race condition on a problem with Windows and as such cannot be reliably induced from the Tcl side, script nor C. The problem affects only sockets which are opened -async. At the time of the socket's creation the core will remember this fact in the SocketState flags (SOCKET_ASYNC_CONNECT <SAC>) and in the events to look for with select (FD_CONNECT). Then, to handle the possiblity that the script writes to or read from the socket before the connection has completed the driver functions Tcp(Input|Output)Proc check for the flag, and if it is still set enter WaitForSocketEvent (FD_CONNECT) <WFSE> to sync-wait for the connection before continuing to actually read/write. Unfortunately Windows sometimes deigns to not deliver FD_CONNECT, skipping directly to FD_READ|WRITE. When that happens the unmodified WFSE gets stuck in WFSO, and hangs the entire Tcl process. The core actually already has code to deal with that situation, in part. This code is found in the SOCKET_MESSAGE branch of the big switch in SocketProc(). When it finds <SAC> in the flags not reset by an FD_CONNECT event it unconditionally clears the flag and forces an FD_WRITE on other parts (My change adds a comment to the location in question, as marker). This code works for when Windows delivers the first event before the script manages to read/write from the new socket, because then the driver functions will see the cleared flag and not enter WFSE to wait for FD_CONNECT in the first place. However, if the script was fast enough to already be in the WFSE waiting for FD_CONNECT then the main thread is stuck and the change made by SocketProc() does not help. The commit here fixes that issue by extending WFSE to recognize the reset of SAC by SocketProc() as a valid break condition when it waits for FD_CONNECT, thus preventing it from getting stuck.
* New tests covering INPUT_NEED_NL flag handling. One exposes a bug.dgp2014-02-261-0/+71
|
* Do not reopen a win serial channel for serial detection. There are issues ↵oehhar2014-02-243-13/+165
|\ | | | | | | with some Bluetooth virtual com. Fix bug [2413550], patch by Rolf Schroedter
| * Changed position of flag evaluation as proposed by Phil Hoffmanbug_2413550oehhar2014-02-111-18/+18
| |
| * merge 8.5oehhar2014-01-302-187/+116
| |\
| * | win/tclWinChan.c Tcl_InitNotifier: Bug [2413550] Avoid reopening of serial ↵oehhar2014-01-304-13/+171
| | | | | | | | | | | | channels which causes issues with Bluetooth virtual com. Patch by Rolf Schroedter.
* | | [1230597] Update test comment.dgp2014-02-191-1/+1
| | |
* | | typojan.nijtmans2014-02-122-2/+2
| | |
* | | Change the flag value to avoid merge conflict with trunk.dgp2014-02-061-1/+1
| | |
* | | [a4494e28ed] Use flag bit instead of NULL pointer to suppress teardown list ofdgp2014-02-063-10/+39
| | | | | | | | | | | | | | | imported commands when the original command gets re-created. This prevents the panic otherwise possible when the invalid state represented by the NULL pointer is encountered during a command delete trace.
* | | Check for existance of __BORLANDC__ before using its valuejan.nijtmans2014-02-061-1/+1
| | |
* | | Satisfy required position of __stdcall from VC++jan.nijtmans2014-02-042-4/+4
| | |
* | | remove duplicate declarationjan.nijtmans2014-02-041-1/+0
| | |
* | | Add missing __stdcall (which crashes on win32), and clean-up indentingjan.nijtmans2014-02-042-20/+23
| | |
* | | Simplify the core output operations of channels. Reduce duplicative anddgp2014-02-043-586/+68
|\ \ \ | | | | | | | | dead code.
| * | | Be sure to finalize the identity encoding.dgp_optimize_output_stagedgp2014-02-041-0/+1
| | | |
| * | | merge 8.5dgp2014-02-034-15/+42
| |\ \ \ | |/ / / |/| | |
* | | | Fix [651e828a52]: Wrong Windows version reported for Windows 8.1jan.nijtmans2014-02-032-11/+36
| | | |
* | | | Fix [4b3b7a3082]: tcl8.5.15/generic/tclExecute.c:7713: array index before ↵jan.nijtmans2014-01-311-3/+5
| |_|/ |/| | | | | | | | sanity check ?
* | | Fix [22c10c8e79]: core-8-5: msvc6 build: "Side by Side" errorjan.nijtmans2014-01-301-1/+1
| | |
* | | Eliminate the use of a staging buffer in WriteChars().dgp2014-01-301-186/+115
|\ \ \ | |_|/ |/| |
| | * Simplify macro typecasting.dgp2014-01-311-6/+3
| | |
| | * The "channel" Tcl_ObjType is caching only. It never needs an UpdateString ↵dgp2014-01-311-46/+6
| | | | | | | | | | | | | | | routine. It's also static to the tclIO.c file.
| | * Do not call updateStringProc directly. We have TclGetString() for that.dgp2014-01-311-10/+1
| | |
| | * Refactor to eliminate the DoWriteChars() layer.dgp2014-01-301-64/+22
| | |
| | * Eliminate DoWrite(). It duplicates WriteBytes().dgp2014-01-301-163/+2
| | |
| | * Trial: Implement DoWrite() as WriteBytes().dgp2014-01-301-0/+4
| | |
| | * Simplification and cleanup enabled by last commit.dgp2014-01-301-301/+7
| | |
| | * Refactor WriteChars() and WriteBytes() into simple wrappers of a commondgp2014-01-303-13/+39
| |/ | | | | routine Write().
| * The outputStage field is now unused, so never allocate it.dgp2014-01-281-29/+0
| |
| * tidy things updgp2014-01-281-194/+17
| |
| * Working code with no staging buffer use.dgp2014-01-281-31/+97
| |
| * WIPdgp2014-01-281-0/+69
| |
| * merge 8.5dgp2014-01-272-0/+4
| |\ | |/ |/|
* | sync tcl.m4 with Tk versionjan.nijtmans2014-01-252-0/+4
| |
* | In WriteChars(), eliminate the copy step through a staging buffer whendgp2014-01-241-10/+12
|\ \ | |/ | | it is not required for channel translation.
| * Eliminate the copy to a staging buffer when that serves no functional purpose.dgp2014-01-241-10/+12
|/
* Silence compiler warnings.dgp2014-01-211-6/+6
|
* [a122627849] Improve stack trace from parray on not-array.dkf2013-11-241-1/+1
|
* Cygwin: Fix conflicting definition with _mingw_stat64.h, if included ↵jan.nijtmans2013-11-221-1/+1
| | | | together with <tcl.h>
* Modify makefile.vc for Windows 8.1 supportjan.nijtmans2013-11-211-1/+9
|
* Add support for Windows 8.1: See ↵jan.nijtmans2013-11-214-3/+78
| | | | [http://msdn.microsoft.com/en-us/library/windows/desktop/dn302074.aspx]
* The only relyable way of changing environment variables to uppercase (e.g. ↵jan.nijtmans2013-11-212-44/+39
| | | | env(ComSpec) to env(COMSPEC)) is unsetting the old one first. Long-standing bug, exposed by [219226].
* Safer clean-up of environment variables: Do removal after insertions -> ↵jan.nijtmans2013-11-204-10/+13
| | | | tcltest 2.3.7
* Starting with Windows 8 DSK, GetVersionExA is deprecatedjan.nijtmans2013-11-202-6/+6
|
* Cygwin: Instead of checking whether the win32 part is configured properly, ↵jan.nijtmans2013-11-193-8/+23
| | | | | just configure it when needed. Always build the stub library first (and - on Cygwin - configure win32 properly just before building the stub library)
* Fix [e832d2b08]: unnecessary code in Tcl_SetMaxBlockTime.jan.nijtmans2013-11-161-5/+1
|
* Fix [426679ef7d]: Having man.macros after .TH breaks rendering on OpenBSD ↵jan.nijtmans2013-11-05209-209/+209
| | | | and possibly others.
* Put extern "C" guards around all stub table struct definitions, so it is ↵jan.nijtmans2013-11-046-17/+28
| | | | | usable for C++ compilers as well without the danger of modifying the calling convention. For tclDecls.h it was no problem, because tcl.h already contains those guards. But for the other *Decls.h files (e.g. tclTomMathDecls.h) it was not correct.
* Workaround for [414d10346b]: tcl 8.5.15/8.6.1(threaded build) hangs in exec ↵jan.nijtmans2013-10-292-6/+5
| | | | on HP-UX