From 5c45b4438a71983503c59523b09236a9e2965b6e Mon Sep 17 00:00:00 2001 From: Johann Dirry Date: Tue, 20 Jan 2026 23:10:21 +0100 Subject: [PATCH] Add Windows stub for orphan cleanup (#808) Co-authored-by: Johann Dirry --- internal/util/orphan_windows.go | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 internal/util/orphan_windows.go diff --git a/internal/util/orphan_windows.go b/internal/util/orphan_windows.go new file mode 100644 index 00000000..fcf2ca53 --- /dev/null +++ b/internal/util/orphan_windows.go @@ -0,0 +1,29 @@ +//go:build windows + +package util + +// OrphanedProcess represents a claude process running without a controlling terminal. +// On Windows, orphan cleanup is not supported, so this is a stub definition. +type OrphanedProcess struct { + PID int + Cmd string + Age int // Age in seconds +} + +// CleanupResult describes what happened to an orphaned process. +// On Windows, cleanup is a no-op. +type CleanupResult struct { + Process OrphanedProcess + Signal string // "SIGTERM", "SIGKILL", or "UNKILLABLE" + Error error +} + +// FindOrphanedClaudeProcesses is a Windows stub. +func FindOrphanedClaudeProcesses() ([]OrphanedProcess, error) { + return nil, nil +} + +// CleanupOrphanedClaudeProcesses is a Windows stub. +func CleanupOrphanedClaudeProcesses() ([]CleanupResult, error) { + return nil, nil +}