diff options
| author | LemonBoy <thatlemon@gmail.com> | 2020-10-20 08:51:21 +0200 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2020-12-29 10:40:00 -0700 |
| commit | dc810eb73b08edfc445f2ce043806be00a236abf (patch) | |
| tree | 6062dc5dbf4ebf5948ba1bde1317e5d01487e12c /lib/std/packed_int_array.zig | |
| parent | 1590ed9d6aea95e5a21e3455e8edba4cdb374f2c (diff) | |
| download | zig-dc810eb73b08edfc445f2ce043806be00a236abf.tar.gz zig-dc810eb73b08edfc445f2ce043806be00a236abf.zip | |
std: Avoid deadlocking in ChildProcess.exec
Reading stdin&stderr at different times may lead to nasty deadlocks (eg.
when stdout is read before stderr and the child process doesn't write
anything onto stdout).
Implement a polling mechanism to make sure this won't happen: we read
data from stderr/stdout as it becomes ready and then it's copied into an
ArrayList provided by the user, avoiding any kind of blocking read.
Diffstat (limited to 'lib/std/packed_int_array.zig')
0 files changed, 0 insertions, 0 deletions
