Skip to content

Commit e06ccd7

Browse files
committed
vminitd: Set nofile rlimit to infinity
Not sure why we had this at 65k.
1 parent db113ff commit e06ccd7

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

vminitd/Sources/vminitd/InitCommand.swift

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -172,11 +172,8 @@ struct InitCommand {
172172

173173
private static func adjustLimits() throws {
174174
var limits = rlimit()
175-
guard getrlimit(RLIMIT_NOFILE, &limits) == 0 else {
176-
throw POSIXError(.init(rawValue: errno)!)
177-
}
178-
limits.rlim_cur = 65536
179-
limits.rlim_max = 65536
175+
limits.rlim_cur = RLIM_INFINITY
176+
limits.rlim_max = RLIM_INFINITY
180177
guard setrlimit(RLIMIT_NOFILE, &limits) == 0 else {
181178
throw POSIXError(.init(rawValue: errno)!)
182179
}

0 commit comments

Comments
 (0)