# Fix two random bugs in macOS process spawning \(\#59133\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/60ed56b372dba2befe0361ff8b433a29c44562f0)

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

Visibility: public

Requested revision: 60ed56b372dba2befe0361ff8b433a29c44562f0

Requested commit: 60ed56b372dba2befe0361ff8b433a29c44562f0

Commit: 60ed56b372dba2befe0361ff8b433a29c44562f0

Tree: feb6d1106f91aae1d5308fa3c820d89799986705

Author: Cole Miller

Committer: GitHub

## Message

```
Fix two random bugs in macOS process spawning (#59133)

I asked Claude Fable 5 to review our macOS process spawning layer, and
it found two notable bugs:

- We didn't mark stdio descriptors as inherited when the `Inherit`
option was passed. This means they would be closed in the child due to
`POSIX_SPAWN_DEFAULT_CLOEXEC`. Now we correctly mark them as inherited.
- Child processes were inheriting Rust's default `SIG_IGN` disposition
for `SIGPIPE`. `std::process::Command` resets the disposition to
`SIG_DFL` for children, and this PR makes us do that too, with a
regression test.

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [x] Unsafe blocks (if any) have justifying comments
- [x] The content adheres to Zed's UI standards
([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
and
[icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md)
guidelines)
- [x] Tests cover the new/changed behavior
- [x] Performance impact has been considered and is acceptable

Release Notes:

- N/A

---------

Co-authored-by: Marshall Bowers <git@maxdeviant.com>
```

## Parents

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

[Source at this commit](https://git.cafe/gitcafe/zed/tree/60ed56b372dba2befe0361ff8b433a29c44562f0?format=markdown)
