mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-05-17 04:31:55 +00:00
fix(gateway): ignore invoking CLI ancestor during PID scan
This commit is contained in:
parent
a1d57292af
commit
9f7f9aafab
2 changed files with 27 additions and 0 deletions
|
|
@ -280,6 +280,8 @@ def _scan_gateway_pids(exclude_pids: set[int], all_profiles: bool = False) -> li
|
|||
if any(pattern in command for pattern in patterns) and (
|
||||
all_profiles or _matches_current_profile(command)
|
||||
):
|
||||
if _is_pid_ancestor_of_current_process(pid):
|
||||
continue
|
||||
_append_unique_pid(pids, pid, exclude_pids)
|
||||
except (OSError, subprocess.TimeoutExpired):
|
||||
return []
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue