summaryrefslogtreecommitdiffstats
path: root/generic/tclIOUtil.c
Commit message (Collapse)AuthorAgeFilesLines
* Cherrypick [527d354828]andy2017-08-081-2/+2
|
* Fix [79614fb8b61983ac8ef30ea8752c310465798fc7|79614fb8b6]: "glob", "encoding ↵jan.nijtmans2016-11-111-2/+2
|\ | | | | | | system" and encoding-free filesystems
| * Fix [79614fb8b61983ac8ef30ea8752c310465798fc7|79614fb8b6]: "glob", "encoding ↵jan.nijtmans2016-11-111-2/+2
| | | | | | | | system" and encoding-free filesystems
* | Simplify all the Tcl_NRPostProc declarations.dgp2016-07-061-2/+1
| |
* | Where "interp" is only used for error-reporting, it can be allowed to be ↵jan.nijtmans2015-10-071-10/+24
| | | | | | | | NULL. This should fix [5da26d4760]: Tcl_LoadFile() segfaults if "interp" is NULL.
* | Increase some counter sizes related to filesystem epoch from int to size_t. ↵jan.nijtmans2015-07-151-13/+25
| | | | | | | | And prevent them ever becoming 0 due to an overflow. (backported with variation from androwish)
* | If the file system changes when "cwd" changes, force a filesystem refresh on ↵jan.nijtmans2015-06-231-6/+17
| | | | | | | | path objects. Needed for AndroWish/TclKit (???) in obscure situations, harmless on systems which only have a single native filesystem.
* | Merged the workarounds and fixes for wrapped executables on variousandreask2014-05-281-1/+85
|\ \ | |/ | | | | | | platforms into the trunk. For details see the merged revision and its ancestor.
| * Followup on [72c54e1659]. Removed unused variable.andreask2014-05-231-1/+0
| |
| * Workarounds and fixes for wrapped executables on various platforms andreask2014-05-221-1/+86
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | regarding the handling of wrapped dynamic libraries. The basic flow of operation is to copy such libraries into a temp file, hand them to the OS loader for processing, and then to delete them immediately, to prevent them from being accessible to other executables. On platforms where that is not possible the library is left in place and things are arranged to delete it on regular process exit. An example of the latter are older revisions of HPUX which report that the file is busy when trying to delete it. Younger revisions of HPUX have changed to allow the deletion, but are also buggy, the OS loader mangles its data structures so that a second library loaded in this manner fails. More recently it was found that Linux which is usually ok with deleting the file and gets everything right shows the same trouble as modern HPUX when the "docker" containerization system is involved, or more specifically the AUFS in use there. Deleting the loaded library file mangles data structures and breaks loading of the following libraries. For a demonstration which does not involve Tcl at all see the ticket https://github.com/dotcloud/docker/issues/1911 in the docker tracker. This of course breaks the use of wrapped executables within docker containers. This commit introduces the function TclSkipUnlink() which centralizes the handling of such exceptions to unlinking the library after unload, and provides code handling the known cases. IOW HPUX is generally forced to not unlink, and ditto when we detect that the copied library file resides within an AUFS. The latter must however be explicitly activated by setting the define -DTCL_TEMPLOAD_NO_UNLINK during build. We still need proper configure tests to set it on the relevant platforms (i.e. Linux). The AUFS detection and handling can be overridden by the environment variable TCL_TEMPLOAD_NO_UNLINK which can force the behaviour either way (skip or not). In case the user knows best, or wishes to test if the problem with AUFS has been fixed.
* | Eliminate all usage of WIN32 and __WIN32__ macros: Some compilers (e.g. ↵jan.nijtmans2014-02-101-4/+4
| | | | | | | | | | Clang/LLVM) don't define it, and _WIN32 is much more portable anyway. See: [http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system#WindowsCygwinnonPOSIXandMinGW]
* | revert mistaken commit of experimentdgp2013-09-231-1/+1
| |
* | merge releasedgp2013-09-201-1/+1
| |
* | 3613569 Handle case when TclpTempFileNameForLibrary returns NULL.dgp2013-05-201-0/+3
| |
* | Unbreak msvc builds, by depending on tclPort.h for inclusion of <sys/stat.h>jan.nijtmans2013-02-101-1/+0
|\ \ | |/
| * Unbreak msvc builds, by depending on tclPort.h for inclusion of <sys/stat.h>.jan.nijtmans2013-02-101-1/+0
| |
* | revert [8abba84224], and make sure that every source file that uses ↵jan.nijtmans2013-01-171-3/+1
|\ \ | |/ | | | | Tcl_StatBuf has an "#include <sys/stat.h>" before including tcl.h
| * revert [8abba84224], and make sure that every source file that uses ↵jan.nijtmans2013-01-171-3/+1
| | | | | | | | Tcl_StatBuf has an "#include <sys/stat.h>" before including tcl.h
| * Add dummy 0 parameter (unused flags) to internal Tcl_FSLoadFileProc call, ↵jan.nijtmans2012-10-241-1/+5
| |\ | | | | | | | | | for upwards compatibility with version 2 filesystems
| | * Add dummy 0 parameter (unused flags) to internal Tcl_FSLoadFileProc call, ↵jan.nijtmans2012-10-241-1/+5
| | | | | | | | | | | | for upwards compatibility with version 2 filesystems
| | * Reference to correct Bug #numberjan.nijtmans2012-08-061-1/+1
| | |
* | | unbreak Mac OSX buildjan.nijtmans2012-10-231-1/+1
| | |
* | | Add "flags" parameter from Tcl_LoadFile to to various internal functions, so ↵jan.nijtmans2012-10-231-52/+8
|\ \ \ | |/ / | | | | | | these flags are available through the whole filesystem for (future) internal use
| * | Remove unused TclpLoadFile function.jan.nijtmans2012-10-231-43/+0
| | |
* | | Minor changes to improve style (C89 declarations, consistent indentation,dkf2012-08-071-3/+6
| | | | | | | | | | | | clarification of #endifs, reduction of unnecessary casts, use of array syntax for reading array elements, etc.)
| | |
| \ \
*-. \ \ 3554250 Overlooked one field of cleanup in the thread exit handlerdgp2012-08-071-0/+1
|\ \ \ \ | | |/ / | | | | for the filesystem subsystem.
| | * | 3554250 Overlooked one field of cleanup in the thread exit handlerdgp2012-08-071-0/+1
| |/ / | | | | | | for the filesystem subsystem.
* | | Final part of result generation conversion (modulo any minor blunders)dkf2012-08-051-45/+57
| | |
* | | converting to using Tcl_Obj API for error message generation; part donedkf2012-08-031-2/+3
| | |
* | | Factor out a number of common patterns of use of Tcl_DStringAppend.dkf2012-07-031-1/+1
| | |
* | | Simplify tclFileSystem.h. Define structs where used.dgp2012-06-281-10/+55
|\ \ \ | |/ /
| * | Simplify tclFileSystem.h. Define structs where used.dgp2012-06-281-10/+55
| | |
* | | 3024359 Make sure that the per-thread cache of the list of file systemsdgp2012-06-251-34/+50
|\ \ \ | |/ / | | | | | | | | | currently registered is only updated at times when no active loops are traversing it. Also reduce the amount of epoch storing and checking to where it can make a difference.
| * | Repair Claim/Disclaim imbalancedgp2012-06-251-0/+1
| | |
| * | Simplify bug fix so that active claims on the FilesystemRecord list of a threadbug_3024359dgp2012-06-251-52/+17
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | prevent any overwriting of that per-thread cache. This keeps active traversals of the list valid. The possible downside is that this may result in some delay in noticing new epochs and result in somewhat greater likelihood we will cache things in a "path" value that are out of date. Since the system has to deal with out of date cached data anyway, this should have no correctness affects, measured against the status quo. In multi-threaded operation the possibility of caching and/or retrieving outdated information can never be eliminated. Checkin also includes merge of 8.5.
| * \ \ merge 8.5dgp2012-06-221-37/+12
| |\ \ \ | | |/ /
| * | | merge 8.5dgp2012-06-221-2/+11
| |\ \ \
| * \ \ \ merge 8.5dgp2012-06-211-28/+1
| |\ \ \ \
| * | | | | Only record the filesystemEpoch when it actually marks the validity ofdgp2012-06-211-2/+2
| | | | | | | | | | | | | | | | | | something we are caching.
| * | | | | merge 8.5dgp2012-06-201-10/+4
| |\ \ \ \ \
| * | | | | | Next draft fix. This one appears to solve the problem, at least as demo'ddgp2012-06-181-46/+40
| | | | | | | | | | | | | | | | | | | | | by the test attached to Tcl Bug 3024359.
| * | | | | | More work in progress.dgp2012-06-131-38/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The problem with release of the elements of a fileSystemList by one routine while some other (caller) routine is still traversing that list is not dependent on threaded operations. An unthreaded build can still encounter the problem. Revised so that threaded/unthreaded operations are much closer to the same (no direct TCL_THREADS dependency). Also simplified the epoch checking which reduces locking to when it's needed. Still have the problem of returning as valid FilesystemRecords that are pulled from an outdated epoch.
| * | | | | | Convert function calls to macros.dgp2012-06-121-21/+31
| | | | | | |
| * | | | | | First draft patch to fix Bug 3024359. No reliable test yet.dgp2012-06-111-10/+90
| | | | | | |
* | | | | | | FilesystemRecord structs no longer need refcountingdgp2012-06-221-34/+10
|\ \ \ \ \ \ \ | | |_|_|_|/ / | |/| | | | |
| * | | | | | FilesystemRecord structs no longer need refcounting.dgp2012-06-221-34/+11
| | |_|_|/ / | |/| | | |
* | | | | | Revise the order of memory free, so that bugs that attempt to access freed ↵dgp2012-06-221-2/+11
|\ \ \ \ \ \ | |/ / / / / | | | | | | | | | | | | | | | | | | memory are more likely to segfault and not remain hidden.
| * | | | | Revise the order of memory free, so that bugs that attempt to access freeddgp2012-06-221-2/+11
| | |_|/ / | |/| | | | | | | | memory are more likely to segfault and not remain hidden.
* | | | | Stop storing FilesystemRecord in the intrep of a "path". We never use it.dgp2012-06-211-26/+1
|\ \ \ \ \ | |/ / / / | | | | | Store the Tcl_Filesystem instead, which is what we actually need.
| * | | | Stop storing FilesystemRecord in the intrep of a "path". We never use it.dgp2012-06-211-26/+1
| | |/ / | |/| | | | | | Store the Tcl_Filesystem instead, which is what we actually need.