# fix child process spawn on macos hangs issue · gitcafe/zig

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

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

Visibility: public

Requested revision: 9e4cd1f4e6c3195665daa80c6a438cfd4daa92b1

Requested commit: 9e4cd1f4e6c3195665daa80c6a438cfd4daa92b1

Commit: 9e4cd1f4e6c3195665daa80c6a438cfd4daa92b1

Tree: 3eb75978b7f806eaf4be1429ca6c1174d68be002

Author: Rabin Gaire

Committer: Rabin Gaire

## Message

```
fix child process spawn on macos hangs issue

When a child process with stdin, stdout behavior set to pipe is
ran on macos it used to hang which has been fixed. Issue existed because
we forgot to call `posix_spawn_file_actions_addclose` syscall on user
exposed file descriptor which resulted on file descriptor not closing
properly.

```

## Parents

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

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