aghos

package
v0.106.0-b.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 29, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Overview

Package aghos contains utilities for functions requiring system calls.

Index

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

func CanBindPrivilegedPorts() (can bool, err error)

CanBindPrivilegedPorts checks if current process can bind to privileged ports.

func ConfigureSyslog

func ConfigureSyslog(serviceName string) error

ConfigureSyslog reroutes standard logger output to syslog.

func HaveAdminRights

func HaveAdminRights() (bool, error)

HaveAdminRights checks if the current user has root (administrator) rights.

func RunCommand

func RunCommand(command string, arguments ...string) (int, string, error)

RunCommand runs shell command.

func SendProcessSignal

func SendProcessSignal(pid int, sig syscall.Signal) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL