kill

package
v1.5.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Kill

func Kill(pid int, sig syscall.Signal) error

Kill sends a signal to a process

func RunKill

func RunKill(w io.Writer, args []string, opts KillOptions) error

RunKill sends a signal to a process

Types

type KillOptions

type KillOptions struct {
	Signal  string // -s: specify a signal to send
	List    bool   // -l: list signal names
	Verbose bool   // -v: verbose output
	JSON    bool   // -j: output as JSON
}

KillOptions configures the kill command behavior

type KillResult

type KillResult struct {
	PID     int    `json:"pid"`
	Signal  int    `json:"signal"`
	Success bool   `json:"success"`
	Error   string `json:"error,omitempty"`
}

KillResult represents the result of a kill operation for JSON output

Jump to

Keyboard shortcuts

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