aboutsummaryrefslogtreecommitdiff
path: root/src/zig_clang.cpp
diff options
context:
space:
mode:
authorLemonBoy <thatlemon@gmail.com>2020-10-20 08:51:21 +0200
committerJonathan Marler <johnnymarler@gmail.com>2021-06-17 17:39:32 -0600
commit34c00ecf57a50e19b31fce420044311c4f2e9c7a (patch)
tree4e12d9cbd5de56979506d1f14050adde2722231b /src/zig_clang.cpp
parent6f0cfdb8206026f239ca079a9f3eebae20bd5310 (diff)
downloadzig-34c00ecf57a50e19b31fce420044311c4f2e9c7a.tar.gz
zig-34c00ecf57a50e19b31fce420044311c4f2e9c7a.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 'src/zig_clang.cpp')
0 files changed, 0 insertions, 0 deletions