Fix some shell regressions (#9630)

* Fix undefined memory on subprocess exit immediately and fix crash when writing a lot of data

* format

* Test for #9458

* Document

* Lazily create iowriters (i think this solves fdleak tests?)

* Fix `big_data` test hanging

* I think this make leak tests more stable

* accidentally had deinit in another thread

* oops

* Fixes

---------

Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
This commit is contained in:
Zack Radisic
2024-03-27 10:33:38 -06:00
committed by GitHub
parent a9ad303fe2
commit aee8eeaf45
5 changed files with 302 additions and 99 deletions

View File

@@ -150,6 +150,11 @@ pub fn Result(comptime T: anytype) type {
pub const success: @This() = @This(){
.result = std.mem.zeroes(T),
};
pub fn asErr(this: @This()) ?ShellErr {
if (this == .err) return this.err;
return null;
}
};
}