fix: address greptile feedback

This commit is contained in:
dotta
2026-03-20 06:18:00 -05:00
parent 22b38b1956
commit a0a28fce38
4 changed files with 37 additions and 3 deletions

View File

@@ -607,6 +607,9 @@ function isTrackedLocalChildProcessAdapter(adapterType: string) {
return SESSIONED_LOCAL_ADAPTERS.has(adapterType);
}
// A positive liveness check means some process currently owns the PID.
// On Linux, PIDs can be recycled, so this is a best-effort signal rather
// than proof that the original child is still alive.
function isProcessAlive(pid: number | null | undefined) {
if (typeof pid !== "number" || !Number.isInteger(pid) || pid <= 0) return false;
try {