Closed mreinstein closed 7 years ago
Both SIGTERM and SIGINT are trapped and execute the same code so clean up routines are handled properly.
I don't think this is likely to change any time soon, if ever.
https://sourceforge.net/p/sox/code/ci/master/tree/src/sox.c#l1793
Ah ok, so this is a case of the sox manpage omitting details. Thanks!
from the sox/rec man page:
A Ctrl-C is a
SIGINT
signal I believe. But the code callscp.kill()
which according to node docs, omitting an argument sendsSIGTERM
(https://nodejs.org/dist/latest-v7.x/docs/api/child_process.html#child_process_child_kill_signal)I think this change should be safe, since both
sox
andarecord
will exit on aSIGINT
.From the arecord man page:
@gillesdemey thoughts? I don't know if using sigterm is preventing the child process from exiting cleanly but this might be a good change to follow the documentation for
rec
. If this is appealing happy to send a PR.