kernel: gen_modules_vhdx.sh does not clean up its temporary scratch directory
Open
@chessturo is already working on this.
Since Dec 15, 2025.
feature
- Dominant language
- C++
- Stars
- 33.7k
- Forks
- 1.8k
- Avg merge
- 3d 17h
- Merged PRs (30d)
- 116
Description
In the WSL2 Kernel repo, Microsoft/scripts/gen_modules_vhdx.sh creates a temporary directory using mktemp -d but never cleans it up. This leaves ~360MB worth of extra files in /tmp, which may pile up over time.
It would be prudent to add rm -rf "$tmp_dir" to the end of the script, or trap 'rm -rf "$tmp_dir"' EXIT right after creating it with mktemp.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.