Skip to content

Commit 61c5661

Browse files
authored
stable release: Merge pull request #10 from matveynator/tvey/set-system-limits-on-program-start
Add legacy build tags for limit tuning
2 parents a70fbe9 + 4f58e31 commit 61c5661

8 files changed

Lines changed: 8 additions & 0 deletions

pkg/limits/limits_posix_darwin_freebsd.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//go:build darwin || freebsd
2+
// +build darwin freebsd
23

34
// Package limits includes POSIX-specific limit tuning to mirror xinetd-like defaults on BSD-derived systems.
45
// Using a BSD-focused file keeps type handling compatible with the int64-based Rlimit definitions.

pkg/limits/limits_posix_linux.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//go:build linux
2+
// +build linux
23

34
// Package limits includes POSIX-specific limit tuning to mirror xinetd-like defaults on Linux.
45
// Using a Linux-specific file keeps type handling aligned with the platform's syscall definitions.

pkg/limits/limits_posix_openbsd.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//go:build openbsd
2+
// +build openbsd
23

34
// Package limits includes POSIX-specific limit tuning to mirror xinetd-like defaults on OpenBSD.
45
// OpenBSD omits RLIMIT_AS, so the code targets RLIMIT_DATA to keep memory ceilings generous.

pkg/limits/limits_proc_darwin.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//go:build darwin
2+
// +build darwin
23

34
// Package limits records the Darwin RLIMIT_NPROC identifier without pulling extra headers.
45
// Explicit constants keep cross-compilation predictable for release automation.

pkg/limits/limits_proc_freebsd.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//go:build freebsd
2+
// +build freebsd
23

34
// Package limits defines FreeBSD's RLIMIT_NPROC numeric identifier for process cap tuning.
45
// Encoding it here keeps the rest of the codebase decoupled from cgo or external packages.

pkg/limits/limits_proc_linux.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//go:build linux
2+
// +build linux
23

34
// Package limits embeds Linux-specific resource numbers to avoid external dependencies.
45
// Keeping the constant here prevents cross-platform files from importing non-standard modules.

pkg/limits/limits_proc_openbsd.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//go:build openbsd
2+
// +build openbsd
23

34
// Package limits includes the OpenBSD RLIMIT_NPROC value so process ceilings can be raised at startup.
45
// Hardcoding the numeric value keeps the build pure Go without extra dependencies.

pkg/limits/limits_windows.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
//go:build windows
2+
// +build windows
23

34
// Package limits documents the lack of configurable RLIMIT-style knobs on Windows.
45
// The stub still runs through the channel pipeline so the caller sees consistent behavior.

0 commit comments

Comments
 (0)