You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
… processes spawned by other means
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.
Use an implementation more like swift-testing does for wait tests, which doesn't suffer from this issue.
Closes#82
… processes spawned by other means
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.
Use an implementation more like swift-testing does for wait tests, which doesn't suffer from this issue.
Closes#82
Process termination monitoring is started asynchronously with the closure which receives the Execution, meaning any use of Execution in the body to send signals, etc., may send them to a pid which no longer refers to the original process. The cleanup handler may also run after the process has already terminated. This compounds with the fix for #82 (#83) to fully resolve the race conditions.
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.
The text was updated successfully, but these errors were encountered: