Files
wehub-resource-sync a06f331eb8
CI / benchmark (push) Has been skipped
install-script / posix-syntax (push) Successful in 6m1s
CI / build-onnx (push) Failing after 6m43s
init-smoke / dry-run (push) Failing after 15m57s
security / govulncheck (push) Has been cancelled
security / trivy-fs (push) Has been cancelled
CI / test (1.26, ubuntu-latest) (push) Has been cancelled
Scorecard supply-chain security / Scorecard analysis (push) Has been cancelled
CI / test (1.26, macos-latest) (push) Has been cancelled
CI / build-windows (push) Has been cancelled
CI / lint (push) Has been cancelled
install-script / powershell-syntax (push) Has been cancelled
install-script / install (macos-14) (push) Has been cancelled
install-script / install (ubuntu-latest) (push) Has been cancelled
chore: import upstream snapshot with attribution
2026-07-13 12:33:42 +08:00

26 lines
736 B
Go

//go:build windows
package daemon
// isEMFILE reports whether err is a file-descriptor-exhaustion error.
// Windows has no RLIMIT_NOFILE and its socket layer surfaces exhaustion
// differently, so the accept loop never takes the EMFILE branch there —
// this is a constant false.
func isEMFILE(error) bool {
return false
}
// FDLimit mirrors the Unix struct so callers compile unchanged. On
// Windows both fields stay zero — there is no per-process descriptor
// cap to report.
type FDLimit struct {
Soft uint64
Hard uint64
}
// RaiseFDLimit is a no-op on Windows: the OS imposes no RLIMIT_NOFILE
// equivalent on a user process, so there is nothing to raise.
func RaiseFDLimit() (FDLimit, error) {
return FDLimit{}, nil
}