mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-06-21 10:22:18 +00:00
fix(raft): set stdin=DEVNULL on bridge subprocess
Satisfies the repo-wide subprocess-stdin guard (tests/tools/test_subprocess_stdin_guard.py); the long-lived bridge child should not inherit the gateway's stdin.
This commit is contained in:
parent
22ccb12c30
commit
7d86178cf5
1 changed files with 3 additions and 1 deletions
|
|
@ -533,7 +533,9 @@ class RaftAdapter(BasePlatformAdapter):
|
|||
]
|
||||
env = {**os.environ, "RAFT_CHANNEL_TOKEN": self._bridge_token}
|
||||
try:
|
||||
self._bridge_process = subprocess.Popen(cmd, env=env)
|
||||
self._bridge_process = subprocess.Popen(
|
||||
cmd, env=env, stdin=subprocess.DEVNULL
|
||||
)
|
||||
logger.info("[raft] Spawned bridge pid=%d profile=%s endpoint=%s", self._bridge_process.pid, profile, endpoint)
|
||||
except Exception:
|
||||
logger.exception("[raft] Failed to spawn bridge")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue