Skip to content

AI turns documents or topics into real, native PowerPoint decks—with native shapes, transitions and animations, data-backed charts and tables on demand, audio narration from speaker notes, and support for your own .pptx templates. · by Hugo He

fix: verify wrapped Python daemon processes

Dongjie Wu0d8fc4b1e34c
diff --git a/skills/ppt-master/scripts/confirm_ui/server.py b/skills/ppt-master/scripts/confirm_ui/server.py
index ebb3b142..952b2dbb 100644
--- a/skills/ppt-master/scripts/confirm_ui/server.py
+++ b/skills/ppt-master/scripts/confirm_ui/server.py
@@ -1062,12 +1062,17 @@ def _wait_for_server_ready(
try:
with urllib.request.urlopen(health_url, timeout=1) as resp:
data = json.load(resp)
+ lock = _read_lock(project_path / LOCK_FILE_NAME)
+ server_pid = _lock_pid(lock)
if (
resp.status == 200
and isinstance(data, dict)
and data.get('service') == 'confirm_ui'
and data.get('project') == str(project_path)
- and data.get('pid') == proc.pid
+ and lock is not None
+ and lock.get('port') == port
+ and data.get('pid') == server_pid
+ and _process_alive(server_pid)
):
return True
last_error = 'health response belongs to another service or project'
diff --git a/skills/ppt-master/scripts/svg_editor/server.py b/skills/ppt-master/scripts/svg_editor/server.py
index 108afb9f..456105ca 100644
--- a/skills/ppt-master/scripts/svg_editor/server.py
+++ b/skills/ppt-master/scripts/svg_editor/server.py
@@ -1077,12 +1077,17 @@ def _wait_for_ready(
try:
with urllib.request.urlopen(health_url, timeout=1) as response:
data = json.load(response)
+ lock = _read_lock(_lock_file(project_path))
+ server_pid = _lock_pid(lock)
if (
response.status == 200
and isinstance(data, dict)
and data.get('service') == 'live_preview'
and data.get('project') == str(project_path)
- and data.get('pid') == proc.pid
+ and lock is not None
+ and lock.get('port') == port
+ and data.get('pid') == server_pid
+ and _process_alive(server_pid)
):
return True
last_error = 'health response belongs to another service or project'