fix(process): settle launcher exit without dropping descendant lineage

Refresh a mismatched launcher snapshot only when a new live process table proves its PID absent. Preserve uncertainty for detached descendants and continue checking ownership of surviving group members before signaling. Index retained lineage membership instead of rescanning it for each refreshed process.

Adapted from #1357. Validation: 71 source tests passed, one Linux-only identity case skipped; 32 real process-boundary tests passed on macOS.

Co-authored-by: You Wish <29498139+Y0UW1SH@users.noreply.github.com>
This commit is contained in:
morluto
2026-10-11 11:06:10 +08:00
co-authored by You Wish
parent e5bc4e85ec
commit 80896a1d64
4 changed files with 252 additions and 42 deletions
+1 -1
View File
@@ -116,7 +116,7 @@ export const observeOwnedProcessLineage = async (
const identityFailure = launcherIdentityFailure(launcher, ownership);
if (identityFailure !== null)
return unavailableLineage(ownership, identityFailure);
const descendants = descendantsOf(launcher.pid, processes);
const descendants = descendantsOf([launcher.pid], processes);
const verifiedDescendants: ProcessTableEntry[] = [];
for await (const { process: member, observation } of readProcessRunTokens(
host,