Skip to content

fix windows e2e backend not stopping on sigterm waiting 10s for no reason#21781

Merged
Hona merged 1 commit intoanomalyco:devfrom
Hona:pr/windows-sigterm-fix
Apr 10, 2026
Merged

fix windows e2e backend not stopping on sigterm waiting 10s for no reason#21781
Hona merged 1 commit intoanomalyco:devfrom
Hona:pr/windows-sigterm-fix

Conversation

@Hona
Copy link
Copy Markdown
Member

@Hona Hona commented Apr 9, 2026

Summary

  • treat worker backends that exit on SIGTERM with only signalCode set as already stopped
  • avoid the extra 10 second wait and forced SIGKILL path on Windows when the process already exited cleanly

Validation

  • not rerun in the clean PR worktree

Copilot AI review requested due to automatic review settings April 9, 2026 23:42
@Hona Hona requested a review from adamdotdevin as a code owner April 9, 2026 23:42
@Hona Hona changed the title fix windows e2e backend stop on sigterm fix windows e2e backend stop on sigterm waiting 10s for no reason Apr 9, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adjusts the e2e backend shutdown logic to correctly detect processes that have already exited due to SIGTERM (notably on Windows), avoiding an unnecessary wait + forced SIGKILL.

Changes:

  • Add a helper to treat signalCode-only exits as “already stopped”.
  • Use the new predicate in waitExit() and stop() to skip redundant termination steps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +47 to +49
function done(proc: ReturnType<typeof spawn>) {
return proc.exitCode !== null || proc.signalCode !== null
}
Copy link

Copilot AI Apr 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The helper name done is pretty generic and doesn’t communicate that it specifically means “child process has exited” (exitCode or signalCode is set). Consider renaming to something more explicit (e.g. hasExited / isStopped) to make the stop logic easier to read/maintain.

Copilot uses AI. Check for mistakes.
@Hona Hona changed the title fix windows e2e backend stop on sigterm waiting 10s for no reason fix windows e2e backend not stopping on sigterm waiting 10s for no reason Apr 9, 2026
@Hona Hona merged commit f327584 into anomalyco:dev Apr 10, 2026
19 of 20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants