Documentation ¶
Overview ¶
Package aghos contains utilities for functions requiring system calls.
Index ¶
- Constants
- Variables
- func CanBindPrivilegedPorts() (can bool, err error)
- func ConfigureSyslog(serviceName string) error
- func HaveAdminRights() (bool, error)
- func IsOpenWrt() (ok bool)
- func RunCommand(command string, arguments ...string) (int, string, error)
- func SendProcessSignal(pid int, sig syscall.Signal) error
- func SetRlimit(val uint)
Constants ¶
View Source
const MaxCmdOutputSize = 2 * 1024
MaxCmdOutputSize is the maximum length of performed shell command output.
Variables ¶
View Source
var NativeEndian = binary.LittleEndian
NativeEndian is the native endianness of this system.
Functions ¶
func CanBindPrivilegedPorts ¶
CanBindPrivilegedPorts checks if current process can bind to privileged ports.
func ConfigureSyslog ¶
ConfigureSyslog reroutes standard logger output to syslog.
func HaveAdminRights ¶
HaveAdminRights checks if the current user has root (administrator) rights.
func RunCommand ¶
RunCommand runs shell command.
func SendProcessSignal ¶
SendProcessSignal sends signal to a process.
func SetRlimit ¶
func SetRlimit(val uint)
SetRlimit sets user-specified limit of how many fd's we can use https://github.com/AdguardTeam/AdGuardHome/internal/issues/659.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.