aboutsummaryrefslogtreecommitdiffstats
path: root/assistant.py
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-28 12:58:42 +0200
committerDanilo M. <danix@danix.xyz>2026-09-28 12:58:42 +0200
commit2497055f6315e3dd2af7422cba3dde51db5c7d82 (patch)
treea1bcc471a8283fe58d36575cb77a8083aea4b9f5 /assistant.py
parent183dfe3ae34418653aca3d20628b3938c8348c2a (diff)
downloaddesktop-assistant-2497055f6315e3dd2af7422cba3dde51db5c7d82.tar.gz
desktop-assistant-2497055f6315e3dd2af7422cba3dde51db5c7d82.zip
Let arecord die with the assistant
It was the only child started without PR_SET_PDEATHSIG. The assistant died with no log line and left arecord recording into the unlinked raw file for ~76 minutes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'assistant.py')
-rw-r--r--assistant.py2
1 files changed, 1 insertions, 1 deletions
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)