5bfc0baa4cd0dd49646d6fdcbe9d4a2fb34cefa7
## Summary Follow-up to #40716. This applies the same `reset_exception_ports()` fix to `set_pre_exec_to_start_new_session()`, which is used by shell environment capture, terminal spawning, and DAP transport. ### Root Cause After more debugging, I finally figured out what was causing the issue on my machine. Here's what was happening: 1. Zed spawns a login shell (zsh) to capture environment variables 2. A pipe is created: reader in Zed, writer mapped to fd 0 in zsh 3. zsh sources `.zshrc` → loads oh-my-zsh → runs poetry plugin 4. Poetry plugin runs `poetry completions zsh &|` in background 5. Poetry inherits fd 0 (the pipe's write end) from zsh 6. zsh finishes `zed --printenv` and exits 7. Poetry still holds fd 0 open 8. Zed's `reader.read_to_end()` blocks waiting for all writers to close 9. Poetry hangs (likely due to inherited crash handler exception ports interfering with its normal operation) 10. Pipe stays open → Zed stuck → no more processes spawn (including LSPs) I confirmed this by killing the hanging `poetry` process, which immediately unblocked Zed and allowed LSPs to start. However, this workaround was needed every time I started Zed. While poetry was the culprit in my case, this can affect any shell configuration that spawns background processes during initialization (oh-my-zsh plugins, direnv, asdf, nvm, etc.). Fixes #36754 ## Test plan - [x] Build with `ZED_GENERATE_MINIDUMPS=true` to force crash handler initialization - [x] Verify crash handler logs appear ("spawning crash handler process", "crash handler registered") - [x] Confirm LSPs start correctly with shell plugins that spawn background processes Release Notes: - Fixed an issue on macOS where LSPs could fail to start when shell plugins spawn background processes during environment capture.
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS, Linux, and Windows you can download Zed directly or install Zed via your local package manager.
Other platforms are not yet available:
- Web (tracking issue)
Developing Zed
- Building Zed for macOS
- Building Zed for Linux
- Building Zed for Windows
- Running Collaboration Locally
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specifiederror for a crate you've created? If so, addpublish = falseunder[package]in your crate's Cargo.toml. - Is the error
failed to satisfy license requirementsfor a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theacceptedarray inscript/licenses/zed-licenses.toml. - Is
cargo-aboutunable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml, as specified in the cargo-about book.
Description
Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Readme
586 MiB
Languages
Rust
94.7%
JSON-with-Comments
3.1%
Inno Setup
0.6%
Scheme
0.5%
Shell
0.3%
Other
0.4%