Private
Public Access
1
0

Some minor changes

This commit is contained in:
2025-08-29 18:49:00 -06:00
parent 5da92a90d4
commit 54df338ce0
3 changed files with 16 additions and 5 deletions

View File

@@ -148,9 +148,11 @@ final class XPCClient
guard let reply = try await sendSync(req), xpc_get_type(reply) == XPC_TYPE_DICTIONARY else { throw Error.typeError }
let fd = xpc_dictionary_dup_fd(reply, "fd")
if fd < 0 { throw Error.typeError }
let fileHandler = FileHandle(fileDescriptor: fd, closeOnDealloc: true)
return FileHandle(fileDescriptor: fd, closeOnDealloc: true)
if fd < 0 { throw Error.badFileHandle }
return fileHandler
}
public func getSettings() async throws -> Serialized.Settings {
@@ -177,6 +179,7 @@ final class XPCClient
{
case typeError
case encodingError
case badFileHandle
}
enum Signal