For custom mpeg-ts input pipe from IPTV (https://tvheadend.org/projects/tvheadend/wiki/Custom_MPEG-TS_Input), currently this sends signal SIGKILL to terminate the spawned process for the pipe when the pipe is to be closed. If the pipe is defined using a script, this causes the script to be terminated with no way to trap the termination signal. Without being able trap the signal, there's no way for the script to kill any spawned child processes. I realize that SIGKILL is the simplest way to make sure that a directly spawned process is terminated, but it doesn't play well with allowing proper shutdown of normal processes or with scripts.
I suggest creating an option to be able to choose what signal to use - the default can remain SIGKILL. Alternatively, make this try SIGINT first, then if process is still alive after a timeout, send SIGKILL.
This seems to be handled under input/mpegts/iptv/iptv_pipe.c
Combo box allowing to choose from SIGKILL, SIGINT and SIGQUIT could be very handy IMHO.
Yes, and if going that way, I'd say a system-wide default selection, and a per-mux selection if you need it to be different from the default (if you're using different IPTV services or pipe methods).
Combo box allowing to choose from SIGKILL, SIGINT and SIGQUIT could be very handy IMHO.
Yes, and if going that way, I'd say a system-wide default selection, and a per-mux selection if you need it to be different from the default (if you're using different IPTV services or pipe methods).