We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
guard
1 parent 9dd8777 commit 7504155Copy full SHA for 7504155
Sources/Foundation/Process.swift
@@ -942,6 +942,13 @@ open class Process: NSObject, @unchecked Sendable {
942
var spawnAttrs: posix_spawnattr_t? = nil
943
#else
944
var spawnAttrs: posix_spawnattr_t = posix_spawnattr_t()
945
+#endif
946
+#if os(Android)
947
+ guard var spawnAttrs else {
948
+ throw NSError(domain: NSPOSIXErrorDomain, code: Int(errno), userInfo: [
949
+ NSURLErrorKey:self.executableURL!
950
+ ])
951
+ }
952
#endif
953
try _throwIfPosixError(posix_spawnattr_init(&spawnAttrs))
954
try _throwIfPosixError(posix_spawnattr_setflags(&spawnAttrs, .init(POSIX_SPAWN_SETPGROUP)))
0 commit comments