procctl

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsProcessRunning

func IsProcessRunning(pid int) bool

func PathFromEnv

func PathFromEnv(envKey string, defaultFileName string) string

Types

type Controller

type Controller struct {
	PIDFilePath string
	ScanMarker  string
}

func New

func New(pidFilePath string, scanMarker string) Controller

func (Controller) LoadRunningPID

func (c Controller) LoadRunningPID() (int, bool)

func (Controller) ReadPID

func (c Controller) ReadPID() (int, error)

func (Controller) RemovePIDFile

func (c Controller) RemovePIDFile() error

func (Controller) StartBackground

func (c Controller) StartBackground(subcommand string, subcommandArgs []string, logPath string) (int, error)

func (Controller) StartBackgroundCommand

func (c Controller) StartBackgroundCommand(executablePath string, commandArgs []string, logPath string) (int, error)

func (Controller) Stop

func (c Controller) Stop(waitAttempts int, waitDelay time.Duration) (int, bool, error)

func (Controller) WritePID

func (c Controller) WritePID(pid int) error

Jump to

Keyboard shortcuts

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