mirror of
https://github.com/stablyai/orca.git
synced 2026-11-17 19:34:29 +00:00
* fix(cli): preserve runtime access across Linux PID namespaces * fix(cli): give retry advice after runtime replacement * fix(cli): preserve private offline admission policy * test(cli): align admission and launcher contracts * test(cli): prune resolved wall-clock allowance * test(cli): narrow dropped runtime errors without casts * test(cli): use explicit extension for hook service import * test(cli): replay recorded Linux sandbox denial * test: verify packaged Linux desktop CLI ownership * test: handle denied FUSE mounts in desktop fixture * test: use privileged PID namespace in desktop fixture
13 lines
375 B
TypeScript
13 lines
375 B
TypeScript
// Only the private offline compatibility policy uses this unqualified legacy PID observation.
|
|
export function isProcessRunning(pid: number | null | undefined): boolean {
|
|
if (!pid || pid <= 0) {
|
|
return false
|
|
}
|
|
try {
|
|
process.kill(pid, 0)
|
|
return true
|
|
} catch (error) {
|
|
return !(error instanceof Error && 'code' in error && error.code === 'ESRCH')
|
|
}
|
|
}
|