Repository navigation
Description
Is your feature request related to a problem? Please describe.
With the fix for the remaining item of #638 (stop() did not wait for parecord and had no SIGKILL fallback),
record_linux ends parecord like this:
stop(): SIGTERM (and SIGCONT, in case it is paused), wait up to 2000 ms, then SIGKILL.- A new
start()while a take is still running ends the old take first; there the wait is shorter, 500 ms,
so the new take is not held up by a capture that does not end. - Route moves stay instant; a
parecordthey leave behind is killed in the background after the same time.
Both values are internal constants today, because the plugin has no place for Linux-specific settings. They are
generous for normal machines (in our app test a stop took 7–16 ms median, 154 ms at most), but a slow or heavily
loaded machine, or a remote PulseAudio server, may need more, and an app that restarts takes often may want less.
When a timeout runs out, record_linux logs via debugPrint where parecord was stuck (process state, the kernel
function it waits in, whether SIGTERM is pending or ignored), and refers to this issue.
Describe the solution you'd like
Make both timeouts settable by the app, for example:
RecordLinuxOptions(
stopTimeout: Duration(milliseconds: 2000), // stop()
restartStopTimeout: Duration(milliseconds: 500), // a new start() ending the running take
)with the current values as defaults, so nothing changes for apps that do not set them.
Describe alternatives you've considered
- Keep them internal: works for most machines, but an app on a slow machine cannot avoid losing the end of a slow
parecord, and cannot shorten the wait either. - One value for both: simpler, but a restart wants a shorter wait than a stop.
Additional context
- feat(linux): capture with ffmpeg/ALSA, for machines without PulseAudio #629 proposes
RecordLinuxOptions(for the ffmpeg/ALSA backend); the two timeouts would fit there, and they
apply to ffmpeg as the capture program as well. - Follows record_linux:
parecordexit is not handled — no error reason, state staysrecord, stop while paused may leave it running #638 and the 2.2.0 work onfeature/route_change. - I would like to send a PR for this once there is a place for Linux options.
Activity
llfbandit commentedon Nov 5, 2026
I don't understand the issue. There are no such timers in the code.
Please explain clearly what you want to achieve.