mirror of
https://github.com/pewdiepie-archdaemon/odysseus.git
synced 2026-10-07 06:27:42 +00:00
_terminate_owned_daemon() read /proc/<pid>/cmdline and, on FileNotFoundError, unlinked the pid file on the stated assumption that "the daemon may have exited". Off Linux that file is always missing, so the branch always fired: the pid file of a live daemon was deleted and the daemon itself never killed. _owned_daemon_exists() swallowed the same error and therefore always returned False, which is precisely the state its own docstring warns about, since a close against an unrecognised session can bootstrap a fresh daemon and wait on its browser indefinitely. Demonstrated on macOS before the change: a pid file holding a live pid is removed by _terminate_owned_daemon() and _owned_daemon_exists() reports False. After it, the file survives and the daemon is reported present. _process_command_line() now returns None for "this host cannot tell" and _process_is_alive() answers the separate question of whether the pid exists. Without procfs we decline to kill a process we cannot confirm is ours, and we only forget a pid file once the pid is genuinely gone. Linux behaviour is unchanged: the command-line identity check still gates both paths. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| admin_tools.py | ||
| bg_job_tools.py | ||
| coding_tools.py | ||
| document_tools.py | ||
| filesystem_tools.py | ||
| interaction_tools.py | ||
| media_tools.py | ||
| model_interaction_tools.py | ||
| ocr_engine.py | ||
| session_tools.py | ||
| subprocess_tools.py | ||
| web_tools.py | ||