# std.process.Child: fix spawning child proc with new cwd fd · gitcafe/zig

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

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

Visibility: public

Requested revision: 947a3a1be92e0d5ddc5ad263d9434b31e8c170db

Requested commit: 947a3a1be92e0d5ddc5ad263d9434b31e8c170db

Commit: 947a3a1be92e0d5ddc5ad263d9434b31e8c170db

Tree: 74eeb6c331e05164734ec7817c1e169d909adc0d

Author: Andrew Kelley

Committer: Andrew Kelley

## Message

```
std.process.Child: fix spawning child proc with new cwd fd

Before this fix, the dup2 of the progress pipe was clobbering the cwd
fd, causing the fchdir to return ENOTDIR in between fork() and exec().

```

## Parents

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

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