diff options
| -rw-r--r-- | AGENTS.md | 4 | ||||
| -rw-r--r-- | assistant.py | 2 |
2 files changed, 5 insertions, 1 deletions
@@ -303,6 +303,10 @@ drives `arecord` on/off, clip POSTed to `/inference`. `prctl(PR_SET_PDEATHSIG, SIGTERM)` via ctypes in `preexec_fn`: they die with the assistant even on SIGKILL or a kill during startup (tested). Python's default SIGTERM skips `finally`; a handler calls `sys.exit`. +- 2026-09-28: `arecord` lacked it. The assistant died with no log line + (last: "ready, mic is on", cause unknown) and left `arecord` recording + into the unlinked raw file for ~76 min. It now gets `die_with_parent` + too (not yet tested live); `assistant.sh status` lists a stray one. - Gemma confidently gave a wrong fact (a city-to-city distance off by ~10x). No tools yet, so no time/weather/facts lookup. - Recordings live in `$XDG_RUNTIME_DIR` and are deleted on exit. diff --git a/assistant.py b/assistant.py index 2a84cd6..a6d83f4 100644 --- a/assistant.py +++ b/assistant.py @@ -661,7 +661,7 @@ def main(): # default (~125 ms) left the user's waves at 8 levels a second. rec = subprocess.Popen(["arecord", "-q", "-t", "raw", "-f", "S16_LE", "-r", "16000", "-c", "1", "--period-time=33333", RAW], - stderr=subprocess.DEVNULL) + stderr=subprocess.DEVNULL, preexec_fn=die_with_parent) threading.Thread(target=user_levels, args=(rec, turn), daemon=True).start() elif rec: rec.send_signal(signal.SIGINT) |
