Skip to content

Windows unix socket support should use WSA_FLAG_NO_HANDLE_INHERIT flag #64166

Closed

Description

@natebosch

Without this flag a spawned subprocess inherits sockets, which prevents the parent process from cleanly cancelling them. This triggered a deadlock in the test runner under certain conditions where a browser subprocess inherits and keeps-open the unix socket socket used to communicate with test suites spawned as subprocesses. This will be worked around in dart-lang/test#2740, but this could still cause problems elsewhere and doesn't match the behavior on linux.

Activity

  1. added
    area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.
    on Aug 28, 2026
  2. mraleph commented on Aug 31, 2026

    @mraleph
    Member

    We control handle inheritance by setting PROC_THREAD_ATTRIBUTE_HANDLE_LIST. But I can see that there is a path through ProcessStarter::Start when you are launching in kInheritStdio mode which does not set it up correctly - and causes child process to inadvertently inherit all handles. Which is not intended.

  3. natebosch commented on Sep 3, 2026

    @natebosch
    MemberAuthor
  4. added a commit that references this issue on Sep 18, 2026
    3bba203
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

    area-vmUse area-vm for VM related issues, including code coverage, and the AOT and JIT backends.triagedIssue has been triaged by sub team

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions