Closed perillo closed 9 months ago
This code is missing this after calling process.Child.run
:
defer {
testing.allocator.free(rr.stdout);
testing.allocator.free(rr.stderr);
}
As stated in the documentation:
/// If it succeeds, the caller owns result.stdout and result.stderr memory.
Thanks and sorry for the nuisance. I forgot that the default stdout
and stderr
behavior is .Pipe
.
Zig Version
0.12.0-dev.2150+63de8a598
Steps to Reproduce and Observed Behavior
This example has been adapted from https://ziggit.dev/t/how-to-really-trigger-term-stopped-term-unknown-for-std-childprocess/.
The purpose of the test is to make
Child.run
return theStopped
error.Expected Behavior
No idea.
See also #10776 and #18548.