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.
1 parent ba273eb commit b28cdfbCopy full SHA for b28cdfb
Sources/Commands/SwiftRunCommand.swift
@@ -312,16 +312,20 @@ public struct SwiftRunCommand: AsyncSwiftCommand {
312
sigfillset(&sig_set_all)
313
sigprocmask(SIG_UNBLOCK, &sig_set_all, nil)
314
315
+ #if os(FreeBSD) || os(OpenBSD)
316
+ closefrom(3)
317
+ #else
318
#if os(Android)
319
let number_fds = Int32(sysconf(_SC_OPEN_MAX))
320
#else
321
let number_fds = getdtablesize()
- #endif
322
+ #endif /* os(Android) */
323
324
// 2. close all file descriptors.
325
for i in 3..<number_fds {
326
close(i)
327
}
328
+ #endif /* os(FreeBSD) || os(OpenBSD) */
329
#endif
330
331
try TSCBasic.exec(path: path, args: args)
0 commit comments