-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkgdiff-mg: use /var/tmp instead of /tmp as default TMPDIR #19
base: master
Are you sure you want to change the base?
Conversation
Heh, I've been bitten by this a few times, actually (e.g. Chromium and such stack up). Maybe we should even install a |
The problem is, |
systemd systems will typically automatically clean up |
d892fc6
to
815b442
Compare
Pushed version that considers if the script run on a systemd system. |
@mgorny friendly ping |
@mgorny another friendly ping |
815b442
to
7599437
Compare
@mgorny and another friendly ping. I've updated to systemd check to be even more lightweight, by checking for the /run/systemd/system directory (inspired by systemd.eclass). |
pkgdiff can cause large files in the used temprorary directory that are not cleaned up on exit. Using /tmp for those, which is often a tmpfs, which means that the files consume main memory at first. Later the system may move the unused files on the tmpfs into swap. Under systemd, using /var/tmp for files that are not deleted by the creator, which is pkgdiff-mg in our case, is safe, since systemd will automatically delete old unused files from /var/tmp. Signed-off-by: Florian Schmaus <[email protected]>
7599437
to
9681cd4
Compare
@mgorny ping, please consider this (or close this PR). I've been using this for a while now on all my (systemd) dev machines and like to avoid having it to put it in |
pkgdiff can cause large files in the used temprorary directory that are not cleaned up on exit. Using /tmp for those, which is often a tmpfs, which means that the files consume main memory at first. Later the system may move the unused files on the tmpfs into swap.
In any case, using /var/tmp instead of /tmp as default TMPDIR for pkgdiff-mg is sensible. As a genral rule of thumb, /tmp should be used for smaller, size bounded files only; /var/tmp for everything else.