Skip to content

Process termination monitoring implementation on Linux conflicts with processes spawned by other means #82

Open
@jakepetroules

Description

@jakepetroules

The approach used by Subprocess to monitor subprocess termination on Linux is fundamentally flawed as it calls waitid with P_ALL, and WEXITED without WNOWAIT, which will end up reaping pids that were spawned outside the Subprocess library.

We need to use an implementation more like https://github.com/swiftlang/swift-testing/blob/main/Sources/Testing/ExitTests/WaitFor.swift, which doesn't suffer from this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions