AcademySoftwareFoundation / AcademySoftwareFoundation/rez
cleanup tmpdir in new shell process, not rez atexit
- Dominant language
- Python
- Stars
- 1.1k
- Forks
- 369
- Avg merge
- 12d 3h
- Merged PRs (30d)
- 5
Description
When rez executes a ResolvedContext subprocess, tmp files are generated in a tmpdir. Rez deletes these dirs at exit. However in some cases (specifically when using the new rez-env --detach option), this cleanup happens too early and the subprocess fails.
Instead, the subprocess should clean up its own tmpdir. This does mean however that a script (rez-shell.sh) will perform an rm that will delete itself - this isn't a problem on Linux but I don't know about Windows. It also means we have to add an 'rmtree' rex command. This is for internal use only though, so I'll probably call it '_rmtree'.
Contributor guide
Research direction
Trace temporary-directory creation and cleanup for ResolvedContext subprocesses, especially the rez-env --detach path and the rez-shell.sh script. Determine how the subprocess can perform its own cleanup and how an internal _rmtree rex command should work, then verify detached subprocesses no longer fail from early cleanup and consider the script's behavior on Windows.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, shell
- Domain
- cli, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100