# std.process.Child: prevent racing children from inheriting one another's pipes · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/389181f6be8810b5cd432e236a962229257a5b59)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: 389181f6be8810b5cd432e236a962229257a5b59

Requested commit: 389181f6be8810b5cd432e236a962229257a5b59

Commit: 389181f6be8810b5cd432e236a962229257a5b59

Tree: 2130576f275126f3afc715c38161f90e10d0e920

Author: Matthew Lugg

Committer: Andrew Kelley

## Message

```
std.process.Child: prevent racing children from inheriting one another's pipes

The added comment explains the issue here relatively well. The new
progress API made this bug obvious because it became visibly clear that
certain Compile steps were seemingly "hanging" until other steps
completed. As it turned out, these child processes had raced to spawn,
and hence one had inherited the other's stdio pipes, meaning the `poll`
call in `std.Build.Step.evalZigProcess` was not identifying the child
stdout as closed until an unrelated process terminated.

```

## Parents

- [591bbafee37126dab2e035be717bb928c5953155](https://git.cafe/gitcafe/zig/commit/591bbafee37126dab2e035be717bb928c5953155?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/389181f6be8810b5cd432e236a962229257a5b59?format=markdown)
