tart run: allow standard input/output/error FDs for --net-fd

This commit is contained in:
Nikolay Edigaryev
2026-10-13 15:23:12 +01:00
parent dd0b519137
commit fbd8d57a78
-4
View File
@@ -55,10 +55,6 @@ class Softnet: Network {
}
static func validateControlFD(_ fd: Int32, type: Int32 = SOCK_STREAM) throws {
guard fd > STDERR_FILENO else {
throw RuntimeError.Generic("must be greater than 2")
}
var socketType: Int32 = 0
var socketTypeLength = socklen_t(MemoryLayout<Int32>.size)
guard getsockopt(fd, SOL_SOCKET, SO_TYPE, &socketType, &socketTypeLength) == 0 else {