mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-07-31 19:16:29 +00:00
docs(cli): clarify oneshot hard-exit cleanup scope
This commit is contained in:
parent
54eea80bf7
commit
7462546a33
1 changed files with 6 additions and 5 deletions
|
|
@ -82,11 +82,12 @@ def _exit_after_oneshot(rc: object) -> None:
|
|||
native code and subprocess teardown — the exact class of code that may be
|
||||
the abort source — so running them just before the hard exit risks
|
||||
re-arming the crash this routine exists to contain. The stateful cleanup
|
||||
that actually matters for one-shot (the recall SQLite store) is closed
|
||||
explicitly in ``_run_agent``; the only atexit-managed resource otherwise
|
||||
skipped is the symlink-safe-skills ``mkdtemp`` reaper, which is not created
|
||||
on the toolless health-check path this issue is about, and whose fds the OS
|
||||
reclaims at process death regardless.
|
||||
that actually matters for one-shot is closed explicitly in ``_run_agent``:
|
||||
the agent owns its task-scoped processes, terminal/browser sessions, child
|
||||
agents, and clients, while the recall SQLite store is checkpointed there as
|
||||
well. Process-wide orphan sweeps and other general ``atexit`` handlers are
|
||||
intentionally left to a later normal interpreter lifetime; daemon workers
|
||||
and remaining file descriptors are reclaimed when this process exits.
|
||||
"""
|
||||
for stream in (sys.stdout, sys.stderr):
|
||||
try:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue