Skip to content

Fix two random bugs in macOS process spawning - #59133

Merged
cole-miller merged 5 commits into
mainfrom
more-command-fixes
Jun 11, 2026
Merged

Fix two random bugs in macOS process spawning#59133
cole-miller merged 5 commits into
mainfrom
more-command-fixes

Conversation

@cole-miller

@cole-miller cole-miller commented Jun 11, 2026

Copy link
Copy Markdown
Member

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:

  • I've reviewed my own diff for quality, security, and reliability
  • Unsafe blocks (if any) have justifying comments
  • The content adheres to Zed's UI standards (UX/UI and icon guidelines)
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Release Notes:

  • N/A

cole-miller and others added 3 commits June 11, 2026 13:04
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
Co-authored-by: Marshall Bowers <git@maxdeviant.com>
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Jun 11, 2026
@zed-community-bot zed-community-bot Bot added the staff Pull requests authored by a current member of Zed staff label Jun 11, 2026
@cole-miller
cole-miller enabled auto-merge June 11, 2026 17:26
@cole-miller
cole-miller disabled auto-merge June 11, 2026 17:26
@cole-miller
cole-miller enabled auto-merge June 11, 2026 17:28
@cole-miller
cole-miller added this pull request to the merge queue Jun 11, 2026
Merged via the queue into main with commit 60ed56b Jun 11, 2026
34 checks passed
@cole-miller
cole-miller deleted the more-command-fixes branch June 11, 2026 17:46
This was referenced Jun 18, 2026
jonx pushed a commit to jonx/zed-aros that referenced this pull request Jul 17, 2026
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>
jolutz pushed a commit to jolutz/zed that referenced this pull request Aug 8, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement staff Pull requests authored by a current member of Zed staff

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant