pi features docs

This commit is contained in:
Mikkeli Matlock
2026-02-15 22:14:06 +09:00
parent 8669ea06b5
commit b51e1faf8d
7 changed files with 351 additions and 158 deletions

View File

@@ -1,15 +1,15 @@
#!/usr/bin/env python3
"""Launch stats_server and audio_server as child processes."""
"""Launch stats_server and contents_server as child processes."""
import subprocess, sys, signal
from pathlib import Path
d = Path(__file__).parent
procs = [
subprocess.Popen([sys.executable, d / "stats_server.py"]),
subprocess.Popen([sys.executable, d / "audio_server.py"]),
subprocess.Popen([sys.executable, d / "contents_server.py"]),
]
signal.signal(signal.SIGINT, lambda *_: [p.terminate() for p in procs])
signal.signal(signal.SIGTERM, lambda *_: [p.terminate() for p in procs])
print(f"Running stats_server (PID {procs[0].pid}) + audio_server (PID {procs[1].pid})")
print(f"Running stats_server (PID {procs[0].pid}) + contents_server (PID {procs[1].pid})")
for p in procs:
p.wait()