Skip to content

Windows spawn_sync: preserve fail-closed suspended-child startup and handle cleanup #159

Closed

Description

@zackees

Coordinated with FastLED/cli#234 and the application rebase tracked in FastLED/cli#229.

Inspection of src/platform_win/sync_spawn.rs found that spawn_sync creates a suspended child before create_job_object()?, ignores the return from ResumeThread, and keeps raw process/thread handles across fallible setup. If job creation fails, the suspended child and handles escape cleanup; if ResumeThread fails, the caller receives a successful but suspended child. A later dup_inheritable failure also needs an ownership audit. The FastLED native viewer currently checks ResumeThread and must not regress when it consumes this shared capability.

Required: establish owned handles immediately, set up the kill-on-close job before creating the child where possible, treat failed resume as an error, and ensure every failure after child creation terminates the child and closes all handles. Add deterministic fault-injection tests for job/setup/resume errors and retain real Windows containment/liveness coverage. Keep the public semantic API unchanged. This issue is a release-consumption prerequisite for the FastLED process slice.

Activity

  1. added a commit that references this issue on Sep 13, 2026
    1181fdf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions