Feature #2594
Option of what signal to kill process from mpeg-ts pipe
100%
Description
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
History
Updated by Rafal Kupiec almost 10 years ago
Combo box allowing to choose from SIGKILL, SIGINT and SIGQUIT could be very handy IMHO.
Updated by Phil Uithoven almost 10 years ago
Rafal Kupiec wrote:
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).
Updated by Rafal Kupiec almost 10 years ago
Phil Uithoven wrote:
Rafal Kupiec wrote:
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).
Option just per MUX would be enough.
Updated by Jaroslav Kysela about 9 years ago
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset commit:tvheadend|59e62cb1959656f28d136260ae4a0148b777d65d.
Updated by Phil Uithoven about 9 years ago
Jaroslav Kysela wrote:
Applied in changeset commit:tvheadend|59e62cb1959656f28d136260ae4a0148b777d65d.
All good, thanks!