Skip to content

Commit

Permalink
suspend all other threads before closing file descriptors
Browse files Browse the repository at this point in the history
  • Loading branch information
michael-yuji authored and jakepetroules committed Jan 26, 2025
1 parent 54cb2ae commit 6aa009f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/Commands/SwiftRunCommand.swift
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,9 @@ public struct SwiftRunCommand: AsyncSwiftCommand {
sigprocmask(SIG_UNBLOCK, &sig_set_all, nil)

#if os(FreeBSD) || os(OpenBSD)
#if os(FreeBSD)
pthread_suspend_all_np()
#endif
closefrom(3)
#else
#if os(Android)
Expand Down

0 comments on commit 6aa009f

Please sign in to comment.