process

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Package process handles stopping running KubeSolo processes and releasing the ports and file handles they hold before a fresh installation begins. All detection is performed by reading /proc directly — no external tools (lsof, ss, netstat) are required.

Index

Constants

This section is empty.

Variables

View Source
var KubeSoloPorts = []int{2379, 6443, 10443, 6060}

KubeSoloPorts are the TCP ports KubeSolo opens; processes holding any of these are candidates for termination if they are a KubeSolo process.

Functions

func CleanupFileConflicts

func CleanupFileConflicts(dataPath string)

CleanupFileConflicts removes socket files and stale PID files left behind by a previous KubeSolo installation so they do not block the new binary.

func StopAll

func StopAll(initBinary string)

StopAll gracefully stops all running KubeSolo processes: first via the installed service manager (if available), then by PID. After SIGTERM it waits up to ~15 s before sending SIGKILL, and then checks port holders.

func StopByExecutablePath

func StopByExecutablePath()

StopByExecutablePath finds all processes whose /proc/<pid>/exe resolves to the KubeSolo binary path and sends SIGTERM. After a grace period it sends SIGKILL to any survivors. The current process is never signalled.

func StopPortHolders

func StopPortHolders()

StopPortHolders finds processes that hold any KubeSolo port and, if they are confirmed to be KubeSolo processes (by /proc/<pid>/exe), terminates them. Non-KubeSolo processes on the same ports are logged but not touched.

func StopViaInitSystem

func StopViaInitSystem(initBinary string)

StopViaInitSystem asks the detected init system to stop the KubeSolo service before resorting to raw process signals. initBinary is the full path to the init system's control command (e.g. "/bin/systemctl") or empty if unknown.

Types

This section is empty.

Jump to

Keyboard shortcuts

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