Comments (1)
I did some further investigation, and I don't think memfd_create
is worth using because:
- For commands that invoke an external process, like
chezmoi diff
,chezmoi edit
, andchezmoi merge
, the filename on disk is important (c.f. #1481), so using an in-memory file descriptor is not sufficient as it has no meaningful filename. - Where possible, chezmoi already uses pipes to communicate with subprocesses. These already have the advantage of anonymity and being automatically cleaned up when chezmoi exits.
memfd_create
is not available on all OSes (e.g. macOS and Windows), so the existing temporary file code needs to be maintained for these OSes anyway.
Overall, there might be a couple of cases where chezmoi is using temporary files where memfd_create
would make more sense. If you would like to contribute such an improvement then searching the source code for TempDir
and os.MkdirTemp
is a good start for finding where temporary files and directories are currently used. For now, I'll close this issue.
from chezmoi.
Related Issues (20)
- `--follow` and `--recursive` add seem to conflict HOT 1
- Extend re-add command to add new files
- .chezmoiignore thinks closing braces are a pattern HOT 3
- Trouble ignoring certain files HOT 3
- `chezmoi edit-config-template` creates initial template with world-writable permissions HOT 2
- Using environment variable in onepasswordRead HOT 2
- Support chmod in attributes HOT 5
- Powershell one-line install on Windows 11 error - update script at https://get.chezmoi.io/ps1 HOT 1
- run time bug when `chezmoi doctor` invoked HOT 6
- Make accidental removal harder
- forced update says "Already up to date." HOT 1
- Ability to dry-run / diff scripts HOT 5
- Local repository. HOT 7
- Documentation update "Why do I get a blank buffer or empty file when running chezmoi edit" HOT 2
- Import/merge separate source directories? HOT 2
- Set command line options via environment variables HOT 1
- Precedence of .chezmoiremove vs. exact_ attributes? HOT 2
- SOPS Support HOT 7
- Config variables `autoAdd = true` and `autoCommit = true` don't seem to add or commit changes HOT 2
- bitwarden and bitwardenFields template functions seems not working HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from chezmoi.