Skip to content

The agent that grows with you

chore(process): the ddgs and WhatsApp comments match the code again

kshitijk4poora74843a2038d
diff --git a/plugins/platforms/whatsapp/adapter.py b/plugins/platforms/whatsapp/adapter.py
index fd47ce9569b..6650da7f8e2 100644
--- a/plugins/platforms/whatsapp/adapter.py
+++ b/plugins/platforms/whatsapp/adapter.py
@@ -716,8 +716,10 @@ class WhatsAppAdapter(WhatsAppBehaviorMixin, BasePlatformAdapter):
if not self._ensure_bridge_deps(bridge_path.parent):
return False
self._session_path.mkdir(parents=True, exist_ok=True)
- # A secondary adopts or reaps only a bridge its own pidfile identifies (crash restart);
- # the default keeps its historical adopt-or-clear-the-port path.
+ # A secondary adopts or reaps only a bridge its own pidfile identifies; the default keeps
+ # its historical adopt-or-clear-the-port path. A bridge this version started dies with
+ # its gateway (spawn_owned), so what is adopted here is one a pre-update gateway or
+ # another process left running; credentials are on disk, so a fresh bridge needs no re-pair.
if (not secondary or prior_bridge_is_ours) and await self._reuse_running_bridge(bridge_path):
return True
if self._foreign_bridge_session:
diff --git a/plugins/web/ddgs/provider.py b/plugins/web/ddgs/provider.py
index 63f6ee73534..49cf6d352aa 100644
--- a/plugins/web/ddgs/provider.py
+++ b/plugins/web/ddgs/provider.py
@@ -109,8 +109,8 @@ def _spawn_worker(env: dict[str, str]) -> subprocess.Popen:
if path_entry and path_entry not in child_pythonpath.split(os.pathsep):
env["PYTHONPATH"] = path_entry + os.pathsep + child_pythonpath if child_pythonpath else path_entry
worker_path = os.path.join(os.path.dirname(os.path.abspath(__file__)), "_search_worker.py")
- # Own process group/session so terminate/kill also reach a hung primp grandchild.
- # detached-spawn: ok — awaited under a 30 s cap that kills its group; an owner killed mid-search leaves it running until that search returns (unbounded if primp hangs)
+ # Own process group/session. The 30 s cap terminates then kills the worker's pid only, not its group.
+ # detached-spawn: ok — awaited under a 30 s cap that kills the worker; an owner killed mid-search leaves it running until that search returns (unbounded if primp hangs)
extra_kwargs: dict[str, Any] = {"creationflags": subprocess.CREATE_NEW_PROCESS_GROUP} if sys.platform == "win32" else {"start_new_session": True}
# stdin/stdout/stderr stay explicit keyword args so scripts/check_subprocess_stdin.py sees them
# (TUI gateway inherits stdin). stderr=DEVNULL: a chatty child would deadlock a stdout-only drain.