mirror of
https://github.com/cirruslabs/tart.git
synced 2026-10-18 03:53:56 +02:00
tart run: allow standard input/output/error FDs for --net-fd
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user