process

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2026 License: MIT Imports: 3 Imported by: 1

Documentation

Overview

Package process provides cross-platform process management utilities.

This package abstracts platform differences in process handling:

  • Signal handling (Windows lacks SIGTERM, uses Kill instead)
  • Process group management (Unix has Setpgid, Windows does not)
  • Daemon/service detachment patterns

Platform-specific implementations are in process_unix.go and process_windows.go.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindAndSignal

func FindAndSignal(pid int) error

FindAndSignal finds a process by PID and sends a termination signal. Returns an error if the process cannot be found or signaled.

func SetDetached

func SetDetached(cmd *exec.Cmd)

SetDetached configures a command to run detached from the parent process. On Unix, this sets up a new process group. On Windows, this is a no-op as basic detachment works differently.

func Signal

func Signal(pid int) error

Signal sends a termination signal to the process with the given PID. On Unix, this sends SIGTERM. On Windows, this calls Process.Kill() since Windows doesn't support SIGTERM.

Types

This section is empty.

Jump to

Keyboard shortcuts

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