Merge nux: process util

This commit is contained in:
Steve Yegge
2025-12-28 18:45:36 -08:00

View File

@@ -1,13 +1,3 @@
// Package util provides utility functions for Gas Town.
// This file was created as part of an E2E polecat workflow test.
package util
import "os"
// ProcessExists checks if a process with the given PID exists.
// It uses the Unix convention of sending signal 0 to test for process existence.
func ProcessExists(pid int) bool {
proc, err := os.FindProcess(pid)
if err != nil {
return false
}
return proc.Signal(nil) == nil
}