| ... | @@ -2998,7 +2998,7 @@ fn gimmeMoreOfThoseSweetSweetFileDescriptors() void { | ... | @@ -2998,7 +2998,7 @@ fn gimmeMoreOfThoseSweetSweetFileDescriptors() void { |
| 2998 | } | 2998 | } |
| 2999 | | 2999 | |
| 3000 | while (true) { | 3000 | while (true) { |
| 3001 | lim.cur = min + (max - min) / 2; | 3001 | lim.cur = min + @divTrunc(max - min, 2); // on freebsd rlim_t is signed |
| 3002 | if (posix.setrlimit(.NOFILE, lim)) |_| { | 3002 | if (posix.setrlimit(.NOFILE, lim)) |_| { |
| 3003 | min = lim.cur; | 3003 | min = lim.cur; |
| 3004 | } else |_| { | 3004 | } else |_| { |