Don't tug on that, you never know what it might be attached to
13 days ago
- #Linux Capabilities
- #Bug Tracking
- #Emacs
- The article discusses a bug where `emacsclient` couldn't find the socket file created by Emacs, leading to a failure in communication.
- The issue was traced to a discrepancy in the `TMPDIR` environment variable, causing `emacsclient` to look in `/mnt/tmp` while Emacs created the socket in `/tmp`.
- Further investigation revealed that Perl, used in a script (`git-re-edit`) to start Emacs, was stripping the `TMPDIR` from the environment due to Linux's capabilities feature.
- A workaround was implemented by explicitly setting the socket location via an environment variable (`EMACS_SERVER_SOCKET`), bypassing the `TMPDIR` issue.
- The root cause was identified as Perl having elevated capabilities, prompting the dynamic loader to sanitize the environment, including removing `TMPDIR`.