process

package
v0.0.31 Latest Latest
Warning

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

Go to latest
Published: May 6, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package process provides utilities for managing process-related operations, such as PID file handling and process management.

Package process provides utilities for managing process-related operations, such as PID file handling and process management.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindProcess

func FindProcess(pid int) (bool, error)

FindProcess finds a process by its ID and checks if it's running. This function works on both Linux and macOS.

func GetPIDFilePath

func GetPIDFilePath(containerBaseName string) string

GetPIDFilePath returns the path to the PID file for a container

func KillProcess

func KillProcess(pid int) error

KillProcess kills a process by its ID

func ReadPIDFile

func ReadPIDFile(containerBaseName string) (int, error)

ReadPIDFile reads the process ID from a file

func RemovePIDFile

func RemovePIDFile(containerBaseName string) error

RemovePIDFile removes the PID file

func WriteCurrentPIDFile

func WriteCurrentPIDFile(containerBaseName string) error

WriteCurrentPIDFile writes the current process ID to a file

func WritePIDFile

func WritePIDFile(containerBaseName string, pid int) error

WritePIDFile writes a process ID to a file

Types

This section is empty.

Jump to

Keyboard shortcuts

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