process

package
v0.0.9 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsRunning

func IsRunning(pidFile string) bool

IsRunning reports whether the process recorded in pidFile is still alive.

func StartBackground

func StartBackground(name, command, dir string, env []string, pidFile string) error

StartBackground runs a shell command as a background process, saves its PID to pidFile, and returns immediately. The process is started in its own process group so it can be killed cleanly with StopProcess.

func StopProcess

func StopProcess(pidFile string) error

StopProcess sends SIGTERM to the process group, waits up to 5 seconds, then sends SIGKILL if the process is still running. Removes the PID file.

Types

This section is empty.

Jump to

Keyboard shortcuts

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