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
a659ad00ed
commit
6a72fdcbbb
@ -533,7 +533,9 @@ class RaftAdapter(BasePlatformAdapter):
|
|||||||
]
|
]
|
||||||
env = {**os.environ, "RAFT_CHANNEL_TOKEN": self._bridge_token}
|
env = {**os.environ, "RAFT_CHANNEL_TOKEN": self._bridge_token}
|
||||||
try:
|
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)
|
logger.info("[raft] Spawned bridge pid=%d profile=%s endpoint=%s", self._bridge_process.pid, profile, endpoint)
|
||||||
except Exception:
|
except Exception:
|
||||||
logger.exception("[raft] Failed to spawn bridge")
|
logger.exception("[raft] Failed to spawn bridge")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user