Skip to content

remote_server: Avoid kill for server liveness checks - #62544

Open
Bbrizly wants to merge 1 commit into
zed-industries:mainfrom
Bbrizly:fix/windows-remote-process-check
Open

remote_server: Avoid kill for server liveness checks#62544
Bbrizly wants to merge 1 commit into
zed-industries:mainfrom
Bbrizly:fix/windows-remote-process-check

Conversation

@Bbrizly

@Bbrizly Bbrizly commented Aug 12, 2026

Copy link
Copy Markdown

Objective

check_server_running currently uses kill -0 <pid> to check whether the remote server is still alive.

That works on Unix, but kill is not available on native Windows hosts, so this check is not cross-platform.

This is related to: #55292 Windows SSH remote-server work.

Solution

Use the existing sysinfo process lookup instead of spawning kill.

The same process lookup was already used elsewhere in server.rs, so this also avoids having two different ways of checking whether a PID exists.

Testing

Added a test that verifies the process lookup detects the current process.

  • cargo fmt --all -- --check
  • cargo test -p remote_server process_exists_finds_current_process
  • cargo clippy -p remote_server --all-targets -- -D warnings

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
  • Tests cover the new/changed behavior
  • Performance impact has been considered and is acceptable

Release Notes:

  • Fixed remote server liveness checks on Windows hosts.

@cla-bot

cla-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown

We require contributors to sign our Contributor License Agreement, and we don't have @Bbrizly on file. You can sign our CLA at https://zed.dev/cla. Once you've signed, post a comment here that says '@cla-bot check'.

@zed-community-bot zed-community-bot Bot added the first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions label Aug 12, 2026
@maxdeviant maxdeviant changed the title remote_server: avoid kill for server liveness checks remote_server: Avoid kill for server liveness checks Aug 12, 2026
@Bbrizly

Bbrizly commented Aug 13, 2026

Copy link
Copy Markdown
Author

@cla-bot check

@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Aug 13, 2026
@cla-bot

cla-bot Bot commented Aug 13, 2026

Copy link
Copy Markdown

The cla-bot has been summoned, and re-checked this pull request!

@dinocosta dinocosta added platform:windows happens only on Windows, not other OS platform:remote Remote development, SSH and zed-remote-server labels Aug 13, 2026
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 first contribution the author's first pull request to Zed. NOTE: the label application is automated via github actions platform:remote Remote development, SSH and zed-remote-server platform:windows happens only on Windows, not other OS

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants