Checks if a given PID corresponds to a live process matching an exec hint, used for process validation.
// Source: https://github.com/superbasedapp/observer | License: Apache-2.0 | Copyright 2026 Gaja AI // Provided via justclaw.it.com; keep this notice with the code. //go:build linux package pidbridge import ( "os" "path/filepath" "strconv" "strings" ) // platformCanValidate reports that this build's platform can answer // liveness + identity questions about local processes (/proc is // introspectable), so the resolver may gate bridge hits on // [ValidateLocalProcess]. const platformCanValidate = true // ValidateLocalProcess reports whether pid names a live process on THIS // host whose identity matches execHint — the guard the watcher/SQLite // attribution path applies before seeding session_pid_bridge from an // adapter-discovered pid (cline-cli's sessions.pid, qwen-code's // runt ... (truncated -- full source via MCP)
See the full source, get the GitHub permalink, and search for more like it.
Get a free API key