File tree Expand file tree Collapse file tree 1 file changed +2
-10
lines changed
Expand file tree Collapse file tree 1 file changed +2
-10
lines changed Original file line number Diff line number Diff line change @@ -19,14 +19,6 @@ import Foundation
1919import Logging
2020import SendableProperty
2121
22- #if canImport(Musl)
23- import Musl
24- private let _syscall = Musl . syscall
25- #elseif canImport(Darwin)
26- import Darwin
27- private let _syscall = Darwin . syscall
28- #endif
29-
3022final class TerminalIO : ManagedProcess . IO & Sendable {
3123 @SendableProperty
3224 private var parent : Terminal ? = nil
@@ -61,12 +53,12 @@ final class TerminalIO: ManagedProcess.IO & Sendable {
6153
6254 func attach( pid: Int32 , fd: Int32 ) throws {
6355 #if os(Linux)
64- let containerFd = _syscall ( Int ( SYS_pidfd_open ) , pid, 0 )
56+ let containerFd = CZ_pidfd_open ( pid, 0 )
6557 guard containerFd != - 1 else {
6658 throw POSIXError . fromErrno ( )
6759 }
6860
69- let hostFd = _syscall ( Int ( CZ_pidfd_getfd) , containerFd, fd, 0 )
61+ let hostFd = CZ_pidfd_getfd ( containerFd, fd, 0 )
7062 guard Foundation . close ( Int32 ( containerFd) ) == 0 else {
7163 self . log? . error ( " failed to close pidfd: \( POSIXError . fromErrno ( ) ) " )
7264 }
You can’t perform that action at this time.
0 commit comments