Documentation
¶
Overview ¶
Package process provides utilities for managing process-related operations, such as PID file handling and process management.
Index ¶
Constants ¶
const ToolHiveDetachedEnv = "TOOLHIVE_DETACHED"
ToolHiveDetachedEnv is the environment variable used to indicate that the process is running in detached mode.
const ToolHiveDetachedValue = "1"
ToolHiveDetachedValue is the expected value of ToolHiveDetachedEnv when set.
Variables ¶
This section is empty.
Functions ¶
func FindProcess ¶
FindProcess finds a process by its ID and checks if it's running. This function works on Unix systems (Linux and macOS).
func IsDetached ¶ added in v0.0.33
func IsDetached() bool
IsDetached checks if the process is running in detached mode.
func ReadPIDFile ¶
ReadPIDFile reads the process ID from a file It checks both the new XDG location and the old temp directory location Note: containerBaseName is pre-sanitized by the caller
func RemovePIDFile ¶
RemovePIDFile removes the PID file It attempts to remove from both the new XDG location and the old temp directory location
Types ¶
This section is empty.