summaryrefslogtreecommitdiffstats
path: root/win/tclWinPipe.c
Commit message (Collapse)AuthorAgeFilesLines
* * win/tclWinPipe.c:davygrvy2004-05-301-44/+56
| | | | | | | | | * win/tclWinPort.h: Reworked the win implementation of Tcl_WaitPid to support exitcodes in the 'signed short' range. Even though this range is non-portable, it is valid on windows. Detection of exception codes are now more accurate. Previously, an application that exited with ExitProcess((DWORD)-1); was improperly reported as exiting with SIGABRT.
* (BuildCommandLine): Use the existence of contents in the linePtr ratherdavygrvy2004-05-101-2/+2
| | | | than the scratch DString post the append, as this more clear.
* (TclpCreateProcess): When under NT, with no console, and executing adavygrvy2004-05-101-2/+2
| | | | | DOS application, the path priming does not need an ending space as BuildCommandLine() will do this for us.
* (BuildCommandLine): Moved non-obvious appending logic to outside the loopdavygrvy2004-05-101-6/+7
| | | | and added commentary for its purpose.
* Refix bug 789040 re-entered in rev 1.41chengyemao2004-05-081-2/+3
|
* * tests/winPipe.test: Six more cases added.davygrvy2004-02-021-6/+2
| | | | | * win/tclWinPipe.c: Fixed BuildCommandLine() to pass the new cases.
* * tests/winPipe.test: Added proof that BuildCommandLine() is notdavygrvy2004-02-021-8/+12
| | | | | | | | doing the "N backslashes followed a quote -> insert N * 2 + 1 backslashes then a quote" rule needed for the crt's parse_cmdline(). * win/tclWinPipe.c: Fixed BuildCommandLine() to pass the new cases.
* * tests/winPipe.test: more pass-thru commandline verifications.davygrvy2004-02-011-8/+2
| | | | | | | * win/tclWinPipe.c (BuildCommandLine): Special case quoting for '{' not required by the c-runtimes's _setargv(). * win/tclAppInit.c: Removed our custom setargv() in favor of the one provided by the c-runtime. [Bug 672938]
* * win/tclWinPipe.c (Tcl_WaitPid): Fixed a thread-safety problem with thedavygrvy2004-01-201-5/+14
| | | | | | process list. The delayed cut operation after the wait was going stale by being outside the list lock. It now cuts within the lock and does a locked splice for when it needs to instead. [Bug 859820]
* All uses of 'panic' (the macro) changeddavygrvy2003-12-241-7/+9
| | | | | | | to 'Tcl_Panic' (the function). The #define of panic in tcl.h clearly states it is deprecated in the comments. [Patch 865264]
* * win/tclWinPipe.c (BuildCommandLine): Applied the patch comingandreas_kupries2003-10-211-3/+6
| | | | | with [Bug 805605] to the code, fixing the incorrect use of ispace noted by Ronald Dauster <ronaldd@users.sourceforge.net>.
* * win/tclWinPipe.c: The windows port of expect can calldavygrvy2003-09-281-1/+4
| | | | | | TclWinAddProcess before any of the other pipe functions. Added a missing PipeInit() call to make sure the initialization happens.
* Bug fix in BuildCommandLine: missing a space when linePtr is not nullchengyemao2003-08-151-2/+3
|
* * win/Makefile.in: Don't define TCL_DBGXmdejong2003-04-151-7/+2
| | | | | | | | | | | | | | | symbol for every compile. Instead, define TCL_PIPE_DLL only when compiling tclWinPipe.c. This will break other build systems, so they will need to remove the TCL_DBGX define and replace it with a define for TCL_PIPE_DLL. * win/tclWinPipe.c (TclpCreateProcess): Remove PREFIX_IDENT and DEBUG_IDENT from top of file. Use TCL_PIPE_DLL passed in from build env instead of trying to construct the dll name from already defined symbols. This approach is more flexible and better in the long run.
* * generic/tcl.h: Removed TCL_PREFIX_IDENT and TCL_DEBUG_IDENTdgp2003-03-121-3/+6
| | | | | * win/tclWinPipe.c: from tcl.h -- they are not part of Tcl's public interface. Put them in win/tclWinPipe.c where they are used.
* * generic/tcl.h: Add TCL_PREFIX_IDENT andmdejong2003-01-281-3/+35
| | | | | | | | | | | | | | | | | TCL_DEBUG_IDENT, used only by TclpCreateProcess. * unix/Makefile.in: Define TCL_DBGX. * win/Makefile.in: Define TCL_DBGX. * win/tclWinPipe.c (TclpCreateProcess): Check that the Tcl pipe dll actually exists in the Tcl bin directory and panic if it is not found. Incorporate TCL_DBGX into the Tcl pipe dll name. This fixes a really mysterious error that would show up when exec'ing a 16 bit application under Win95 or Win98 when Tcl was compiled with symbols. The error seemed to indicate that the executable could not be found, but it was actually the Tcl pipe dll that could not be found.
* * generic/tclPipe.c (TclCleanupChildren):davygrvy2002-12-171-5/+52
| | | | | | | | | | | | | | * tests/winPipe.c: * win/tclWinPipe.c (Tcl_WaitPid): * win/tclWinTest.c: Gave Tcl_WaitPid the ability to return a Win32 exception code translated into a posix style SIG*. This allows [close] to report "CHILDKILLED" without the meaning getting lost in a truncated exit code. In TclCleanupChildren(), TclpGetPid() had to get moved to before Tcl_WaitPid() as the the handle is removed from the list taking away the ability to get the process id after the wait is done. This shouldn't effect the unix implimentaion unless waitpid is called with a pid of zero, meaning "any". I don't think it is..
* * win/tclWinPipe.c: reverted back to -r1.27 due to numerous testdavygrvy2002-12-051-67/+7
| | | | failures that need to be resolved first.
* * win/tclWinPipe.c (Tcl_WaitPid): When a process exits with andavygrvy2002-12-041-5/+52
| | | | | | | | | | | | | exception, pass this notice on to the caller with a SIG* code rather than truncating the exit code and missing the meaning. This allows TclCleanupChildren() to report "CHILDKILLED". This has a different behavior than unix in that closing the read pipe to a process sends the SIGPIPE signal which is returned as a SIGPIPE exit status. On windows, we send the process a CTRL_BREAK_EVENT and get back a CONTROL_C_EXIT which is documented to mean a SIGINT which seems wrong as a system, but is the correct exit status.
* * win/tclWinPipe.c (PipeClose2Proc): Changed CTRL_C_EVENTdavygrvy2002-12-041-2/+2
| | | | to CTRL_BREAK_EVENT as it can't be ignored by the child.
* * win/tclAppInit.c (sigHandler): Protect from trying to close adavygrvy2002-12-041-3/+16
| | | | | | | | | | | | | | | | | | NULL handle. * win/tclWinPipe.c (PipeClose2Proc, TclpCreateProcess): Send a real Win32 signal (CTRL_C_EVENT) when the read channel is brought down to alert the child to close on its side. Start the process with CREATE_NEW_PROCESS_GROUP to allow the ability to send these signals. The following test case now brings down the child without the use of an external [kill] command. % set p [open "|[info name]" w+] file8d5380 % pid $p 2876 % close $p <- now doesn't block in Tcl_WaitPid() %
* * win/tclWinConsole.c:davygrvy2002-11-261-37/+75
| | | | | | | | | | | | | | | | * win/tclWinPipe.c: * win/tclWinSerial.c: * win/tclWinSock.c: * win/tclWinThrd.c: * win/tclWinTime.c: General cleanup of all worker threads used by the channel drivers. Eliminates the normal case where the worker thread is terminated ('cept the winsock one). Instead, use kernel events to signal a clean exit. Only when the worker thread is blocked on an I/O call is the thread terminated. Essentially, this makes all other channel worker threads behave like the PipeReaderThread() function for it's cleaner exit behavior. This appears to fix [Bug 597924] but needs 3rd party confirmation to close the issue.
* * generic/tclEvent.c (TclInExit, TclInThreadExit):mdejong2002-11-071-4/+4
| | | | | | | | | | | | | | | Split out functionality of TclInExit to make it clear which one should be called in each situation. * generic/tclInt.decls: Declare TclInThreadExit. * generic/tclIntDecls.h: Regen. * generic/tclStubInit.c: Regen. * mac/tclMacChan.c (StdIOClose): * unix/tclUnixChan.c (FileCloseProc): * win/tclWinChan.c (FileCloseProc): * win/tclWinConsole.c (ConsoleCloseProc): * win/tclWinPipe.c (TclpCloseFile): * win/tclWinSerial.c (SerialCloseProc): Invoke the new TclInThreadExit method instead of TclInExit.
* * win/tclWinPipe.c (BuildCommandLine): Fixed bug #554068 ([exec]andreas_kupries2002-06-171-1/+6
| | | | | | on windows did not treat { in filenames well.). Bug reported by Vince Darley <vincentdarley@users.sourceforge.net>, patch provided by Vince too.
* 4 fs fixesvincentdarley2002-03-241-2/+2
|
* * [Patch 505630] Updated interfaces of generic/tclBasic.cc (TIP 27).dgp2002-01-251-3/+3
| | | | | | | * [Patch 506818] Updated interfaces of generic/tclHash.c (TIP 27). * [Patch 506807] Updated interfaces of generic/tclObj.c (TIP 27). * [Patch 507304] Updated interfaces of win/tclWin32.c (TIP 27). * Update all callers.
* * Updated interfaces of generic/tclEncoding, generic/tclFilename.c,dgp2002-01-251-4/+4
| | | | | | | | | | | generic/tclIOUtil.c, generic/tclPipe.c, generic/tclResult.c, generic/tclUtil.c, generic/tclVar.c and mac/tclMacResource.c according to TIP 27. Tcl_TranslateFileName rewritten as wrapper around VFS-aware version. Updated callers. ***POTENTIAL INCOMPATIBILITY*** Includes source incompatibilities: argv arguments of Tcl_Concat, Tcl_JoinPath, Tcl_OpenCommandChannel, Tcl_Merge; argvPtr arguments of Tcl_SplitList and Tcl_SplitPath.
* * Updated APIs in the file generic/tclIO.c according to the guidelinesdgp2002-01-151-4/+4
| | | | | | | | | | | of TIP 27. Several minor documentation corrections as well. * Updated channel driver interface according to the guidelines of TIP 27. See also [Bug 500348]. * Moved Tcl_EolTranslation enum declaration from generic/tcl.h to generic/tclInt.h (renamed to TclEolTranslation). It is not used anywhere in Tcl's public interface.
* * win/tclWinPipe.c: More Borland compatibility fixes.davygrvy2001-09-061-2/+5
| | | | [Patch: 436116]
* 2001-08-23 Andreas Kupries <andreas_kupries@users.sourceforge.net>andreas_kupries2001-08-231-3/+3
| | | | | | | | | | * win/tclWinPipe.c (BuildCommandLine): Fixed tcl Bug [432499]. Part of the code used the non-absolute path to the executable to determine quoting. This failed if the absolute path cotained spaces, but the application name itselfl not. This bug caused no trouble on Win NT 5, but does for other variants in the Win* family. Report and fix due to Ken Poole <kenpoole@users.sourceforge.net>.
* Changes from TIP#17 "Redo Tcl's filesystem"vincentdarley2001-07-311-1/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following files were impacted. * doc/Access.3: * doc/FileSystem.3: * doc/OpenFileChnl.3: * doc/file.n: * doc/glob.n: * generic/tcl.decls: * generic/tcl.h: * generic/tclCmdAH.c: * generic/tclCmdIL.c: * generic/tclCmdMZ.c: * generic/tclDate.c: * generic/tclDecls.h: * generic/tclEncoding.c: * generic/tclFCmd.c: * generic/tclFileName.c: * generic/tclGetDate.y: * generic/tclIO.c: * generic/tclIOCmd.c: * generic/tclIOUtil.c: * generic/tclInt.decls: * generic/tclInt.h: * generic/tclIntDecls.h: * generic/tclLoad.c: * generic/tclStubInit.c: * generic/tclTest.c: * generic/tclUtil.c: * library/init.tcl: * mac/tclMacFCmd.c: * mac/tclMacFile.c: * mac/tclMacInit.c: * mac/tclMacPort.h: * mac/tclMacResource.c: * mac/tclMacTime.c: * tests/cmdAH.test: * tests/event.test: * tests/fCmd.test: * tests/fileName.test: * tests/io.test: * tests/ioCmd.test: * tests/proc-old.test: * tests/registry.test: * tests/unixFCmd.test: * tests/winDde.test: * tests/winFCmd.test: * unix/mkLinks: * unix/tclUnixFCmd.c: * unix/tclUnixFile.c: * unix/tclUnixInit.c: * unix/tclUnixPipe.c: * win/tclWinFCmd.c: * win/tclWinFile.c: * win/tclWinInit.c: * win/tclWinPipe.c
* * win/tclWinPipe.c (PipeClose2Proc): constrained the mutex lock tohobbs2001-07-171-17/+16
| | | | just the TerminateThread call and waiting for termination. (jsmith)
* * win/tclWinConsole.c:mdejong2001-07-161-2/+1
| | | | | | | | | | * win/tclWinPipe.c: * win/tclWinPort.h: * win/tclWinSerial.c: * win/tclWinThrd.c: Remove unnecessary #includes of dos.h, direct.h, and tchar.h. This will help the Cygwin porting effort since these headers do not exist under Cygwin.
* up-port of the stacked channel implementation rewrite in 8.3.2 tohobbs2000-09-281-3/+6
| | | | 8.4a2 code base, merged in with some existing new 8.4a2 features.
* * win/tclWinPipe.c: Stage-1 bug fix for TR#2460 "exec leaks memory".davidg2000-09-081-19/+69
| | | | | | | | Added more logic around the close-down of the pipe reader thread so as to avoid, at all cost, a TerminateThread. Most cases with exec are fixed, but I don't consider 2460 done yet. Closing down the read side of a pipe before the child process, doesn't really fit the windows model. [BUG: 2460]
* * win/tclWinPipe.c (BuildCommandLine): Added Tcl_DStringFree callericm2000-07-251-1/+2
| | | | to prevent potential memory leaks [Bug: 6041].
* * win/tclWinDde.c:ericm2000-06-131-5/+5
| | | | | | | | * win/tclWinInit.c: * win/tclWinNotify.c: * win/tclWinPipe.c: * win/tclWinReg.c: * win/tclWinThrd.c: Applied patch from [Bug 5794].
* * win/tclWinPipe.c: Added "CONST" keyword to declaration of charericm2000-04-111-2/+2
| | | | *native in TclpCreateTempFile, to supress compiler warnings.
* * win/tclWinPipe.c (TclpCreateTempFile): Added conversion ofericm2000-04-101-7/+20
| | | | | | | | contents string from UTF to native encoding [Bug: 4030]. * tests/regexp.test: Added tests for infinite looping in [regexp -all]. * generic/tclCmdMZ.c: Fixed infinite loop bug with [regexp -all] [Bug: 4981].
* * win/tclWin32Dll.c:hobbs1999-12-091-471/+76
| | | | | | | | | | | | | | | * win/tclWinChan.c: * win/tclWinFCmd.c: * win/tclWinInit.c: * win/tclWinPipe.c: * win/tclWinSock.c: removed all code that supported Win32s. It was no longer officially supported, and likely didn't work anyway. * win/makefile.vc: removed 16 bit stuff, cleaned up. * win/tcl16.rc: * win/tclWin16.c: * win/winDumpExts.c: these files have been removed from the source tree (no longer necessary to build) * win/aclocal.m4: made it just include tcl.m4
* * win/tclWinPipe.c:redman1999-07-311-1/+7
| | | | | | | | | | * win/Makefile.in: Fixing launching of 16-bit apps on Win9x from wish. The command line was primed with tclpip82.dll, but it was ignored. Fixed that, then fixed the gmake makefile to build tclpip82.dll as an executable. * win/tclWinSock.c: Applied small patch to get thread-specific data after initializing the socket driver.
* Bug fixes for threaded Tcl on NT with single and dual CPUs. Still someredman1999-07-271-4/+6
| | | | open issues, this code is a little more stable though.
* Fix command.com bug on Windows 95/98. [Bug: 2105]redman1999-05-211-2/+2
|
* merged tcl 8.1 branch back into the main trunkstanton1999-04-161-445/+1143
|
* * win/tclWinPipe.c:stanton1999-03-111-11/+33
| | | | | | | | | | | | | | | * generic/tclInt.decls: Added TclWinAddProcess to make it possible for expect to use Tcl_WaitForPid(). This patch is from Gordon Chaffee. * mac/tclMacPort.h: * win/tclWinInit.c: * unix/tclUnixPort.h: * generic/tclAsync.c: Added TclpAsyncMark to fix bug in async handling on Windows where async events don't wake up the event loop. This patch comes from Gordon Chaffee. * generic/tcl.decls: Fixed declarations of reserved slots.
* Replaced SCCS strings, fixed binary filescore_8_0_3stanton1998-09-141-1/+1
|
* added code to handle null argumentsstanton1998-06-151-5/+11
|
* Initial revisionrjohnson1998-03-261-0/+2470