This is a minor regression introduced from #6250. zig run and zig test run the binary as a child process. Instead, on operating systems that support it, they should perform an execve, which is more resource-efficient and has nicer properties when using zig as a child process for these use cases.
| // TODO On operating systems that support it, do an execve here rather than child process, |
| // when watch=false and arg_mode == .run |
| constchild=trystd.ChildProcess.init(argv.items, gpa); |
| deferchild.deinit(); |
This is a minor regression introduced from #6250.
zig runandzig testrun the binary as a child process. Instead, on operating systems that support it, they should perform anexecve, which is more resource-efficient and has nicer properties when using zig as a child process for these use cases.zig/src/main.zig
Lines 1684 to 1687 in 52ba2c3