procscan

package
v0.1.22 Latest Latest
Warning

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

Go to latest
Published: May 15, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package procscan exposes the small set of /proc helpers ctm uses to detect whether the per-pane agent process is alive. It deliberately has no agent-specific knowledge — callers supply the comm name they expect (e.g. "codex", "claude" historically) and procscan walks /proc/*/status with no further coupling.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FindChild

func FindChild(parentPID, procName string) string

FindChild walks /proc/*/status looking for the first PID whose PPid matches parentPID and whose Name matches procName. Returns an empty string if no match is found.

Pure Go — no pgrep dependency, no shell invocations.

func IsAlive

func IsAlive(pid string) (bool, error)

IsAlive reports whether the PID names a non-zombie process. Returns (false, nil) when the PID directory is absent — a "definitely dead" signal that callers handle the same as a zombie. Returns an error only for malformed PIDs (empty or non-numeric).

Types

This section is empty.

Jump to

Keyboard shortcuts

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