| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
errors and do proper refcounting of noe objPtr. [bug 1194429]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tcl.h: the version where the "truncateProc"
* generic/tclIO.c: is defined at, and moved all channel
* generic/tclIOGT.c: drivers of Tcl to v5.
* generic/tclIORChan.c:
* unix/tclUnixChan.c:
* unix/tclUnixPipe.c:
* win/tclWinChan.c:
* win/tclWinConsole.c:
* win/tclWinPipe.c:
* win/tclWinSerial.c:
* win/tclWinSock.c:
|
|
|
|
|
|
|
|
| |
is now solely done in TclpFinalizeSockets() and
TclpFinalizePipes() and not over the thread-exit handler,
because the order of actions the Tcl generic core will
impose may result in cores/hangs if the thread exit handler
tears down corresponding subsystem(s) too early.
|
|
|
|
|
|
| |
* win/tclWinPipe.c: extended error code support on Windows.
* tests/exec.test: Tests for extended error codes.
* generic/tclPipe.c: Permit long codes (platform macros permitting).
|
| |
|
|
|
|
|
|
|
|
| |
* unix/tclUnixPipe.c (TclpOpenFile): use the O_APPEND flag for
* tests/exec.test (exec-19.1): files opened in a pipeline
like ">>this". Note that Windows cannot support such access; there is
no equivalent flag on the handle that can be set at the kernel-call
level. The test is unix-specific in every way. [Bug 1245953]
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclDecls.h: Regenerated from tcl.decls.
* generic/tclStubInit.c:
* doc/CrtChannel.3: Documentation of extended API,
* generic/tcl.decls: extended testsuite, and
* generic/tcl.h: implementation. Removal of old
* generic/tclIO.c: driver-specific TclpCut/Splice
* generic/tclInt.h: functions. Replaced with generic
* tests/io.test: thread-action calls through the
* unix/tclUnixChan.c: new hooks. Update of all builtin
* unix/tclUnixPipe.c: channel drivers to version 4.
* unix/tclUnixSock.c: Windows drivers extended to
* win/tclWinChan.c: manage thread state in a thread
* win/tclWinConsole.c: action handler.
* win/tclWinPipe.c:
* win/tclWinSerial.c:
* win/tclWinSock.c:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclEncoding.c: make use of a ProcessGlobalValue for
* generic/tclEvent.c: storing the executable name.
Added internal routines Tcl(Get|Set)ObjNameOfExecutable() to access
that storage in Tcl_Obj, rather than string format.
* unix/tclUnixFile.c: Rewrote TclpFindExecutable() to use
* win/tclWinFile.c: TclSetObjNameOfExecutable to store the
executable name it computes.
* generic/tclInt.h: Added internal stub entries for
* generic/tclInt.decls: TclpFindExecutable and
Tcl(Get|Set)ObjNameOfExecutable.
* generic/tclIntDecls.h: make genstubs
* generic/tclStubInit.c:
* generic/tclCmdIL.c: Retrieve executable name in Tcl_Obj form
* win/tclWinPipe.c: instead of string form.
* unix/tclUnixTest.c: Update [testfindexecutable] command to use
new internal interfaces.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
startup/initialization of the Tcl library, focused on the
activities of Tcl_FindExecutable().
* generic/tclIO.c: Removed bogus claim in comment that
encoding "iso8859-1" is "built-in" to Tcl.
* generic/tclInt.h: Created a new struct ProcessGlobalValue,
* generic/tclUtil.c: routines Tcl(Get|Set)ProcessGlobalValue,
and function type TclInitProcessGlobalValueProc. Together, these
take care of the housekeeping for "values" (things that can be
held in a Tcl_Obj) that are global across a whole process. That is,
they are shared among multiple threads, and epoch and mutex
protection must govern the validity of cached copies maintained
in each thread.
* generic/tclNotify.c: Modified TclInitNotifier() to tolerate
being called multiple times in the same thread.
* generic/tclEvent.c: Dropped the unused argv0 argument to
TclInitSubsystems(). Removed machinery to unsure only one
TclInitNotifier() call per thread, now that that is safe.
Converted Tcl(Get|Set)LibraryPath to use a ProcessGlobalValue,
and moved them to tclEncoding.c.
* generic/tclBasic.c: Updated caller.
* generic/tclInt.h: TclpFindExecutable now returns void.
* unix/tclUnixFile.c:
* win/tclWinFile.c:
* win/tclWinPipe.c:
* generic/tclEncoding.c: Built new encoding search initialization
on a foundation of ProcessGlobalValues, exposing new routines
Tcl(Get|Set)EncodingSearchPath. A cache of a map from encoding name
to directory pathname keeps track of where encodings are available
for loading. Tcl_FindExecutable greatly simplified into just
three function calls. The "library path" is now misnamed, as its
only remaining purpose is as a foundation for the default encoding
search path.
* generic/tclInterp.c: Inlined the initScript that is evaluated
by Tcl_Init(). Added verification after initScript evaluation
that Tcl can find its installed *.enc files, and that it has
initialized [encoding system] in agreement with what the environment
expects. [tclInit] no longer driven by the value of $::tcl_libPath;
it largely constructs its own search path now, rather than attempt
to share one with the encoding system.
* unix/tclUnixInit.c: TclpSetInitialEncodings factored so that a new
* win/tclWinInit.c: routine TclpGetEncodingNameFromEnvironment
can reveal that Tcl thinks the [encoding system] should be, even
when an incomplete encoding search path, or a missing *.enc file
won't allow that initialization to succeed. TclpInitLibraryPath
reworked as an initializer of a ProcessGlobalValue.
* unix/tclUnixTest.c: Update implementations of [testfindexecutable],
[testgetdefenc], and [testsetdefenc].
* tests/unixInit.test: Corrected tests to operate properly even
when a value of TCL_LIBRARY is required to find encodings.
* generic/tclInt.decls: New internal stubs: TclGetEncodingSearchPath,
TclSetEncodingSearchPath, TclpGetEncodingNameFromEnvironment. These
are candidates for public exposure by future TIPs.
* generic/tclIntDecls.h: make genstubs
* generic/tclStubInit.c:
* generic/tclTest.c: Updated [testencoding] to use
* tests/encoding.test: Tcl(Get|Set)EncodingSearchPath. Updated tests.
|
|
|
|
|
|
|
|
|
|
| |
when closing is the same way the UNIX side works. This is avoid a hung shell
when exiting due to open pipes that refuse to close in a graceful manner.
***POTENTIAL INCOMPATIBILITY***
Scripts that use async pipes on windows, must (like the UNIX side) set -blocking
to 1 before calling [close] to receive the exit status. [Bug 947693]
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* generic/tclBinary.c:
* generic/tclCmdAH.c:
* generic/tclCmdIL.c:
* generic/tclCmdMZ.c:
* generic/tclCompExpr.c:
* generic/tclDictObj.c:
* generic/tclEncoding.c:
* generic/tclExecute.c:
* generic/tclFCmd.c:
* generic/tclHistory.c:
* generic/tclIndexObj.c:
* generic/tclInterp.c:
* generic/tclIO.c:
* generic/tclIOCmd.c:
* generic/tclNamesp.c:
* generic/tclObj.c:
* generic/tclPkg.c:
* generic/tclResult.c:
* generic/tclScan.c:
* generic/tclTimer.c:
* generic/tclTrace.c:
* generic/tclUtil.c:
* generic/tclVar.c:
* unix/tclUnixFCmd.c:
* unix/tclUnixPipe.c:
* win/tclWinDde.c:
* win/tclWinFCmd.c:
* win/tclWinPipe.c:
It is a poor practice to directly set or append to the value
of the objResult of an interp, because that value might be
shared, and in that circumstance a Tcl_Panic() will be the
result. Searched for example of this practice and replaced
with safer alternatives, often using the Tcl_AppendResult()
routine that dkf just rehabilitated.
* library/dde/pkgIndex.tcl: Bump to dde 1.3.1
|
| |
|
|
|
|
|
|
|
|
|
| |
* 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.
|
|
|
|
| |
than the scratch DString post the append, as this more clear.
|
|
|
|
|
| |
DOS application, the path priming does not need an ending space as
BuildCommandLine() will do this for us.
|
|
|
|
| |
and added commentary for its purpose.
|
| |
|
|
|
|
|
| |
* win/tclWinPipe.c: Fixed BuildCommandLine() to pass the new
cases.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
| |
* 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]
|
|
|
|
|
|
| |
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]
|
|
|
|
|
|
|
| |
to 'Tcl_Panic' (the function). The #define
of panic in tcl.h clearly states it is
deprecated in the comments.
[Patch 865264]
|
|
|
|
|
| |
with [Bug 805605] to the code, fixing the incorrect use of
ispace noted by Ronald Dauster <ronaldd@users.sourceforge.net>.
|
|
|
|
|
|
| |
TclWinAddProcess before any of the other pipe functions.
Added a missing PipeInit() call to make sure the
initialization happens.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
* 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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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..
|
|
|
|
| |
failures that need to be resolved first.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
to CTRL_BREAK_EVENT as it can't be ignored by the child.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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/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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
on windows did not treat { in filenames well.). Bug reported by
Vince Darley <vincentdarley@users.sourceforge.net>, patch
provided by Vince too.
|
| |
|
|
|
|
|
|
|
| |
* [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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
[Patch: 436116]
|