I am trying to add a protocol which has all the attributes and functions of a Process but I see a warning with terminationHandler
.
I was hoping not to see this warning since @Sendable
is already added to terminationHandler
.
protocol ProcessProtocol {
var executableURL: URL? { get set }
var arguments: [String]? { get set }
var environment: [String : String]? { get set }
var currentDirectoryURL: URL? { get set }
var standardInput: Any? { get set }
var standardOutput: Any? { get set }
var standardError: Any? { get set }
func run() throws
func interrupt()
func terminate()
func suspend() -> Bool
func resume() -> Bool
var processIdentifier: Int32 { get }
var isRunning: Bool { get }
var terminationStatus: Int32 { get }
var terminationReason: Process.TerminationReason { get }
var terminationHandler: (@Sendable (Process) -> Void)? { get set }
var qualityOfService: QualityOfService { get set }
}
extension Process: ProcessProtocol {}