tmuxreap

package
v1.41.0 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package tmuxreap reaps tmux servers left behind by test binaries that were SIGKILLed before their t.Cleanup handlers could run. It has no dependency on session/session-mux/session-tmux so their internal (same-package) test files can import it without an import cycle — testutil itself already imports all three, which internal test files of those packages cannot.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReapLeakedTestServers

func ReapLeakedTestServers()

ReapLeakedTestServers kills tmux servers whose socket names match a known test prefix AND whose owner PID is no longer alive. Sockets owned by a live PID (another concurrent test runner) are left alone. Call this from TestMain in any package whose tests create tmux servers via a test-prefixed socket name.

func StartTestServerWatchdog

func StartTestServerWatchdog(ownerPID int)

StartTestServerWatchdog spawns a detached shell process that polls ownerPID and kills all test-prefixed tmux sockets bearing that PID when the process exits. The watchdog runs in its own process group so it survives SIGKILL to the test binary, covering the case where go test -timeout fires.

Types

This section is empty.

Jump to

Keyboard shortcuts

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