Skip to content

Commit fb8d64d

Browse files
authored
Remove incorrect guard check for Android (#5171)
1 parent 35f5bcc commit fb8d64d

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

Sources/Foundation/Process.swift

-7
Original file line numberDiff line numberDiff line change
@@ -942,13 +942,6 @@ open class Process: NSObject, @unchecked Sendable {
942942
var spawnAttrs: posix_spawnattr_t? = nil
943943
#else
944944
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-
}
952945
#endif
953946
try _throwIfPosixError(posix_spawnattr_init(&spawnAttrs))
954947
try _throwIfPosixError(posix_spawnattr_setflags(&spawnAttrs, .init(POSIX_SPAWN_SETPGROUP)))

0 commit comments

Comments
 (0)