Context
Odin: dev-2026-02:7b18a08d5
OS: Arch Linux, Linux 6.18.9-arch1-2
CPU: AMD Ryzen 5 8600G w/ Radeon 760M Graphics
RAM: 31167 MiB
Backend: LLVM 21.1.6
Expected Behavior
process_exec should always properly close process handles to avoid EMFILE
Current Behavior
process_exec doesn't clean up process/file handles
Failure Information (for bugs)
Consider the scenario:
You have a program with an infinitely running for loop which will take the stdout of a process_exec call and do parsing on that output and print it to the console every 5s. After a few iterations, process_exec starts erroring out with EMFILE due to the process handles not being properly cleaned up.
Steps to Reproduce
Please provide detailed steps for reproducing the issue.
- call process_exec a bunch of times