sys

package
v2.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckProcessIdentity added in v2.4.0

func CheckProcessIdentity(pid int, expectedCommand string) bool

CheckProcessIdentity verifies that a process with the given PID is still alive and optionally matches the expected command name (to detect PID reuse).

func GetProcessAttributes

func GetProcessAttributes() *syscall.SysProcAttr

GetProcessAttributes returns process attributes for Unix systems.

func GetProcessCommand added in v2.4.0

func GetProcessCommand(pid int) string

GetProcessCommand returns the command name for a given PID. Returns empty string if the process cannot be found.

func GetShutdownSignals

func GetShutdownSignals() []os.Signal

GetShutdownSignals returns the signals to listen for graceful shutdown on Unix systems

func TerminateProcess

func TerminateProcess(p *os.Process) error

TerminateProcess sends SIGTERM to a process on Unix systems.

Types

This section is empty.

Jump to

Keyboard shortcuts

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