[llvm] [lit] Run builtin cat / diff in-process instead of spawning (PR #208024)
Aiden Grossman via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 8 11:01:12 PDT 2026
================
@@ -212,6 +217,76 @@ def _replaceReadFile(match):
return arguments
+class InProcessPipe:
+ """Popen-compatible shim that runs an in-process builtin (cat/diff) inline.
----------------
boomanaiden154 wrote:
We can't move off the `_launch_with_limit` wrapper. We need to spawn a subprocess that then lowers the limits, because we cannot reraise them without elevated permissions. It's also not really handled like a built-in. The performance of `ulimit` doesn't really matter given it's used in maybe 10 tests.
For this patch, `cat` and `diff` should be the only ones you need to be concerned with. All the other ones are just ideas that are future problems for now.
https://github.com/llvm/llvm-project/pull/208024
More information about the llvm-commits
mailing list