Skip to content

Windows watchdog does a hard kill, not graceful shutdown #282

Closed

Description

@thcp

Location: main.py:142
Severity: MED

os.kill(os.getpid(), SIGTERM) on Windows is TerminateProcess — the “so uvicorn runs its shutdown sequence” comment doesn’t hold there. Low impact today (registry persists per-job), but any future shutdown hook silently won’t run on Windows desktop.
On os.name == "nt", signal uvicorn’s Server.should_exit instead (or send CTRL_BREAK_EVENT to the process group).

From the health report. Part of #273 (Phase 2 — Resilience).

Activity

  1. added
    bugSomething isn't working
    reliabilityStability, resource management, race conditions
    on Jul 16, 2026
  2. added a commit that references this issue on Jul 17, 2026
    1050789
  3. self-assigned this
    on Oct 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingreliabilityStability, resource management, race conditions

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions