Skip to content
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

Put temporary files under /run/user/<id> if available ($XDG_RUNTIME_DIR) and clean them up at shell exit #11

Closed
2 tasks done
whisperity opened this issue Nov 20, 2019 · 4 comments
Labels
core 💥 Envprobe core enhancement ✨ New feature or request
Milestone

Comments

@whisperity
Copy link
Owner

whisperity commented Nov 20, 2019

  • Use $XDG_RUNTIME_DIR for envprobe shell-specific root.
  • Clean up the config files and whatnot for exiting shells.
@whisperity whisperity added enhancement ✨ New feature or request core 💥 Envprobe core labels Nov 20, 2019
@whisperity
Copy link
Owner Author

Implemented the first half (using $XDG_RUNTIME_DIR) for the upcoming new version.

@whisperity whisperity added this to the V1 release milestone Feb 21, 2021
@whisperity
Copy link
Owner Author

It's not possible (excluding very weird hacks) to detect if a non-login shell exited. Usually, shells run by users in terminal emulators are not login shells... so I'm scrapping the second idea of this issue, and closing it down with the first.

@whisperity
Copy link
Owner Author

Reopening. Thanks to @christianparpart, it seems a trap funcname EXIT "hook" should make the cleanup possible.

@whisperity whisperity reopened this Mar 26, 2021
@whisperity whisperity changed the title Put temporary files under /run/user/<id> if available ($XDG_RUNTIME_DIR) and try to somehow clean up at shell exit? Put temporary files under /run/user/<id> if available ($XDG_RUNTIME_DIR) and clean them up at shell exit Mar 27, 2021
@whisperity
Copy link
Owner Author

Done. 😓 ZSH's trap "functions" suck, but I figured it out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core 💥 Envprobe core enhancement ✨ New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant