Failure to create a pipe does happen “in the wild” (with the error “too many open files”). Since majority of subprocess executions relate to gathering version control info we can probably ignore the failure, as not having version control info is better than crashing.
OTOH that pipe() fails does seem to be a symptom of a more serious issue.
The io::spawn implementation has also been updated to use io::create_pipe which sets FD_CLOEXEC, so there should be no reason to set this.
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”).