Files
rea/tests/fixtures/hopperLifetimeLaunch.py
T
Ysopwnable c105391db5 fix(hopper): stop Linux demo children when the REA owner exits (#2499)
Bind the owned demo helper to REA's private stdin stream and unwind child
cleanup on EOF during startup or analysis. Verify graceful and SIGKILL owner
exit through real CLI/MCP workflows and preserve unrelated processes.

Assisted-by: Reimu (gensokyo-skills:reimu-incident-triage)
2026-10-13 12:59:22 +08:00

17 lines
551 B
Python

#!/usr/bin/env python3
"""Inspect the real Node launcher stdio with the production lifetime parser."""
import importlib.util
import json
from pathlib import Path
import sys
spec = importlib.util.spec_from_file_location(
"hopper_demo_x11", Path(__file__).resolve().parents[2] / "scripts/hopper-demo-x11.py"
)
assert spec is not None and spec.loader is not None
helper = importlib.util.module_from_spec(spec)
spec.loader.exec_module(helper)
assert "--owner-stdin" in sys.argv
print(json.dumps({"owner_alive": helper.OwnerLifetime(True).alive()}))