rlimit_stub.go
1//go:build !unix
2
3package watcher
4
5// maximizeOpenFileLimit is a no-op on non-Unix systems.
6// Returns a high value to indicate no practical limit.
7func maximizeOpenFileLimit() (int, error) {
8 // Windows and other non-Unix systems don't have file descriptor limits
9 // in the same way Unix systems do. Return a very high value to indicate
10 // there's no practical limit to worry about.
11 return 10000000, nil // 10M handles - way more than any process would use
12}