Download
18 lines 459 BGoModified 2026-10-20 raw
123456789101112131415161718
// Package sandbox applies OpenBSD unveil(2) where available and does nothing
// elsewhere, so the renderer builds and tests on any Unix.
package sandbox

import (
	"golang.org/x/sys/unix"
)

// Path is one path the sandbox lets through, with its permissions.
type Path struct {
	Path  string
	Perms string
}

// Nice lowers the process priority so httpd always wins the scheduler.
func Nice(n int) error {
	return unix.Setpriority(unix.PRIO_PROCESS, 0, n)
}