It seems to be a general trend with network file systems to return wrong errors when they do not support a certain feature (like extended attributes and atomic swap).
The problem is that empty files on a FAT file system all have the same inode so TextMate would consider them to be links of each other and only show the last one opened.
Fixes#979.
The intent of this class was to allow ad-hoc recursive/lazy walking of a directory structure and having links only visited once.
It was however only used once, and for that task, path::entries() is sufficient.
Instead of passing the file descriptor to the child, and have the child close it, we set FD_CLOEXEC on the file descriptor in the parent process.
While it limits the window in which another thread can fork() and cause the file descriptor to be “leaked”, it doesn’t eliminate the problem.
This is read using the ‘environmentWhitelist’ key and the value should be a colon-separated list of variables that should be inherited from TextMate’s parent process. If the variable includes an asterisk then it is matched as a glob.
Example:
defaults write com.macromates.TextMate.preview environmentWhitelist '$default:MANPATH:*EDITOR'
Here ‘$default’ will expand to TextMate’s default whitelist.
Normally TextMate will setup HOME, PATH, TMPDIR, LOGNAME, and USER. If you whitelist any of these, then the variable (if set) will instead be inherited from the parent process.
Closes#718.
Previously when opening a file TextMate only looked at the (cached) inode of the open documents to learn if the requested file was already open. This could result in opening two versions of the same file e.g. after ‘git rebase’ as git will write new files with new inodes when updating the working copy.
Closes issue #666.
The function could fail if the directory was created after the function had tested that it didn’t exist, as the mkdir() would then fail (with “Already Exists”).
Initially the environment was clean but it was found that some variables should be inherited, e.g. SSH_AUTH_SOCK.
Therefor a blacklist was introduced, but it seems futile trying to keep it updated with all the variables that may affect the behavior of commands executed from within TextMate, therefor we now use a whitelist.
Probably the whitelist should be user configurable as launchd uses environment variables to communicate dynamically allocated sockets (like SSH_AUTH_SOCK, but there are also some Apple-prefixed variables pointing to named sockets).
Issue #238.
Since the std::map hosting the basic environment was using a (function local) static initializer, it would be destroyed during exit — though there might be threads using the basic environment, and joining these might happen after destroying the basic environment.
This should explain the crash in network::launch_tbz.
Only one readlink() failure reported (issue #389) which wouldn’t explain the crashes which the dialog (introduced in 68ed8293) was trying to track down.
I am seeing crash reports from resolve_links and I can’t think of any other reason for this crash, than readlink() returning a value which is neither -1 nor in the range [0..len].