summaryrefslogtreecommitdiffstats
path: root/win/tclWinPipe.c
Commit message (Collapse)AuthorAgeFilesLines
* Minor code style cleanup.dkf2019-04-231-159/+300
|
* Don't use TclUniCharIsSpace() in command-line handling: the windows ↵jan.nijtmans2019-02-181-6/+3
| | | | command-line is not aware of Unicode spaces, only ASCII ones.
* Merge 8.5jan.nijtmans2019-01-041-3/+3
|\
| * Fix signed<->unsigned comparsion warning (occurring in some gcc compilation ↵jan.nijtmans2019-01-041-3/+3
| | | | | | | | | | flags). Micro-optimization: Use char array in stead of const char pointer for static variable.
* | Give lambda function a name "ReceiveChunked" for easier testing. New ↵jan.nijtmans2018-09-231-4/+4
| | | | | | | | function quoteString and code cleanup
* | code review after merge with 8.5 (restore usage of some functions, after ↵sebres2018-08-291-9/+9
| | | | | | | | lost by conflict resolving)
* | merge 8.5 ([21b0629c81] 0-day vulnerability - insufficient escape by exec of ↵sebres2018-08-291-52/+181
|\ \ | |/ | | | | batch-files for windows)
| * code review, skip slow test winpipe-8.2 executed args from injectList ↵sebres2018-08-231-31/+50
| | | | | | | | particularly (normally winpipe-8.3 covers the same but jointly), to enable use parameter `-constraints slowTest`, added new test with randomly generated potentially dangerous args
| * code review, restored backwards compatibility of the simplest escape of ↵sebres2018-08-231-12/+25
| | | | | | | | quote-chars (so reverted several tests winpipe-7.x)
| * fixes escape for special cases (+ more test-cases):sebres2018-08-211-32/+110
| | | | | | | | - `%` char to be escaped (quoted) in any case (regardless pairing flag), otherwise `%username%` will be interpolated as username. - escape of multiple backslashes before quote is different (as without following quote) in unpaired quote syntax (upaired flag set)
| * because executable (1st argument) always proper escaped now, don't need to ↵sebres2018-08-201-1/+1
| | | | | | | | replace long path name of batch-executable with short path name (reduced to 16-bit applications only).
| * small amend: avoid reset of unpaired quote flag between arguments (previous ↵sebres2018-08-201-7/+18
| | | | | | | | affects next) + test cases extended with several injection checks.
| * win: fixes [21b0629c81] - exec/open process pipe under windows (0-day ↵sebres2018-08-201-34/+43
| | | | | | | | vulnerability - insufficient escape)
| * win: TclpCreateProcess or [exec process ...] - search for application ↵sebres2018-08-171-4/+5
| | | | | | | | | | | | extended with ".cmd" extension: automatically tries appending ".com", ".exe", ".bat" and ".cmd", in that order, to the name, looking for an executable. (partially cherry-picked from 8.6 branch)
* | Better UTF-8 surrogate handling, only functional when TCL_UTF_MAX>3jan.nijtmans2017-06-081-1/+1
| |
* | Tcl_UtfToUniChar() -> TclUtfToUniChar() in various places: No change in ↵jan.nijtmans2017-05-291-1/+1
| | | | | | | | functionality, just faster if ASCII only strings are involved.
* | Fix gcc warning: unused variable wakeEventjan.nijtmans2017-05-041-2/+1
| |
* | Use GetModuleHandle() in stead of LoadLibrary() when the handle is needed ↵jan.nijtmans2017-05-031-2/+2
|\ \ | |/ | | | | | | for an already loaded dll. Fix filesystem-1.52 (only works correctly on UNIX)
| * (cherry-pick): fix typo-bug (using wrong thread handle by set priority)jan.nijtmans2017-04-281-1/+1
| |
* | merge core-8-6-branchjan.nijtmans2017-04-281-11/+11
|\ \
* | | [win] fixes "wrong" checking of the flag TCL_CLOSE_READ in close2proc (using ↵sebres2017-04-121-3/+2
| | | | | | | | | | | | mask)
* | | code review, robustness increase, avoid infinite wait by exit, thread exit ↵sebres2017-04-111-17/+34
| | | | | | | | | | | | | | | | | | and by pipes of closed processes); use pipe-helpers (TI-structure handling) for all pipe-workers (tclWinConsole, tclWinSerial);
* | | added wake-up event to prevent possible dead-locks by some waiting thread ↵sebres2017-04-111-12/+23
| | | | | | | | | | | | (e. g. for writable events)
* | | prepared to use pipe-helpers (TI-structure handling) for all pipe-workers ↵sebres2017-04-111-334/+380
| | | | | | | | | | | | (tclWinConsole, tclWinSerial)
* | | code review and fix small memory leak using ckalloc, without finalization of ↵sebres2017-04-111-36/+71
| | | | | | | | | | | | tcl subsystem in the worker (if it owns TI structure and calls ckfree)
* | | shared structures of pipe-workers rewritten using atomic state of the thread; sebres2017-04-111-236/+342
| | | | | | | | | | | | asynchronous start/stop of pipe-workers (if possible), try the soft way to end workers using cancelSynchronousIo before it would be terminated;
* | | the same handling to initialize thread without suspend/resume helpers ↵sebres2017-04-051-7/+7
| | | | | | | | | | | | (otherwise may be dangerous by very huge resp. too busy system);
* | | fix typo-bug (using wrong thread handle by set priority)sebres2017-04-051-1/+1
| | |
* | | small review: rewritten using already available event handles, additionally ↵sebres2017-04-051-39/+46
| | | | | | | | | | | | prevents infinite waits (using timeout 5000ms);
* | | Contributed by "stanko" as patch within ↵sebres2017-04-051-6/+78
|/ / | | | | | | | | | | | | | | | | 8bd13f07bde6fb0631f27927e36461fdefe8ca95 Resolves blocking of pipes-thread (reader/writer) under huge last: Terminating threads during their initialization resp. teardown phase may result LoaderLock in the ntdll.dll's (to remain locked indefinitely). This causes ntdll.dll's LdrpInitializeThread() to deadlock trying to acquire LoaderLock. Possible fix for 9d75181ee70af318830e99ede6ebb5df72a9b079
* | Allow additional optional "interp" argument for testinterpresolver command. ↵jan.nijtmans2016-09-051-1/+1
| | | | | | | | | | | | Not used yet in any test-case. Protect panic in tclLiteral.c for possible null-pointer access. (cherry-picked from Gustaf Neuman's interpresolver patch). Eliminate some unecessary spacing.
* | Bugfix [9ece99d58b]. Make exec understand .CMD files on Windows.ashok2016-07-091-3/+4
| |
* | Tcl_GetStringFromObj(..., NULL) -> Tcl_GetString(...). Use size_t in stead ↵jan.nijtmans2015-06-241-6/+6
| | | | | | | | of int for more internal variables.
* | Added comments raising questions about possible updates to channeldgp2014-03-211-0/+6
| | | | | | drivers on Windows.
* | Map WSAEWOULDBLOCK to EWOULDBLOCK. Suggested by Reinhard Max.jan.nijtmans2013-11-161-3/+3
| |
* | Eliminate a lot of dead code (for Windows 95/98/ME only). jan.nijtmans2013-06-191-10/+3
| | | | | | Eliminate all usage of TclWinSetInterfaces(), which does exactly the same as TclpSetInterfaces(), but keep exported symbol and stub entry.
* | Unbreak msvc builds, by depending on tclPort.h for inclusion of <sys/stat.h>jan.nijtmans2013-02-101-2/+0
|\ \ | |/
| * Unbreak msvc builds, by depending on tclPort.h for inclusion of <sys/stat.h>.jan.nijtmans2013-02-101-2/+0
| |
| * [Bug #3362446]: registry keys command fails with 8.5/8.6. Follow Microsofts ↵jan.nijtmans2012-07-111-1/+1
| | | | | | | | | | example better in order to prevent problems when using HKEY_PERFORMANCE_DATA. Forgot one important '%'
| * add TCL_I_MODIFIER and use it in the correct placesjan.nijtmans2012-07-081-1/+1
| |
* | Final part of result generation conversion (modulo any minor blunders)dkf2012-08-051-17/+20
| |
* | Purge use of Tcl_AppendElement, and corrected conversion of PIDs to integerdkf2012-07-311-10/+11
| | | | | | objects.
* | [Bug 3547994]: Abandon the synchronous Windows pipe driver to its fate when ↵ferrieux2012-07-251-4/+22
| | | | | | | | needed to honour TIP#398.
* | 1189293 Make "<<" binary safe.dgp2012-07-051-1/+3
|\ \ | |/
| * 1189293 Make "<<" binary safe.dgp2012-07-051-1/+3
| |\
| | * 1189293 Make '<<' redirects binary safe. Don't use strlen() (or equivalent)dgp2012-07-021-1/+3
| | | | | | | | | to find end of written data bytes.
* | | Factor out a number of common patterns of use of Tcl_DStringAppend.dkf2012-07-031-7/+7
| | |
| | |
| \ \
*-. \ \ [Bug 3508771] load tclreg.dll in cygwin tclshjan.nijtmans2012-04-241-1/+1
|\ \ \ \ | | |/ / | | | | | | | | Implement TclWinGetSockOpt, TclWinGetServByName and TclWinCPUID for Cygwin
| | * | [Bug 3508771] load tclreg.dll in cygwin tclshjan.nijtmans2012-04-241-1/+1
| | |\ \ | |/ / / | | | _ | | | Implement TclWinGetSockOpt, TclWinGetServByName and TclWinCPUID for Cygwin
| | * [Bug 3508771] load tclreg.dll in cygwin tclshjan.nijtmans2012-04-241-1/+1
| | |\ | | | | | | | | | | | | Implement TclWinGetSockOpt, TclWinGetServByName and TclWinCPUID for Cygwin