From: Jaroslav Kysela Date: Sat, 3 Nov 2018 09:25:02 +0000 (+0100) Subject: iptv: add some more traces for pipe fds... X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1222de11478788882d3c94a2b01b37e588f5f074;p=thirdparty%2Ftvheadend.git iptv: add some more traces for pipe fds... --- diff --git a/src/input/mpegts/iptv/iptv.c b/src/input/mpegts/iptv/iptv.c index 5500c2305..afdf08820 100644 --- a/src/input/mpegts/iptv/iptv.c +++ b/src/input/mpegts/iptv/iptv.c @@ -419,6 +419,9 @@ iptv_input_close_fds ( iptv_input_t *mi, iptv_mux_t *im ) { iptv_thread_pool_t *pool = mi->mi_tpool; + if (im->mm_iptv_fd > 0 || im->mm_iptv_fd2 > 0) + tvhtrace(LS_IPTV, "iptv_input_close_fds %d %d", im->mm_iptv_fd, im->mm_iptv_fd2); + /* Close file */ if (im->mm_iptv_fd > 0) { tvhpoll_rem1(pool->poll, im->mm_iptv_fd); diff --git a/src/input/mpegts/iptv/iptv_pipe.c b/src/input/mpegts/iptv/iptv_pipe.c index 89f3a486c..2cf334eb6 100644 --- a/src/input/mpegts/iptv/iptv_pipe.c +++ b/src/input/mpegts/iptv/iptv_pipe.c @@ -54,6 +54,8 @@ iptv_pipe_start goto err; } + tvhtrace(LS_IPTV, "iptv pipe: spawned \"%s\" rd %d pid %d", argv[0], rd, pid); + spawn_free_args(argv); spawn_free_args(envp); @@ -108,8 +110,8 @@ iptv_pipe_read ( iptv_input_t *mi, iptv_mux_t *im ) im->im_data = NULL; spawn_kill(pid, tvh_kill_to_sig(im->mm_iptv_kill), im->mm_iptv_kill_timeout); if (mclk() < im->mm_iptv_respawn_last + sec2mono(2)) { - tvherror(LS_IPTV, "stdin pipe unexpectedly closed: %s", - r < 0 ? strerror(errno) : "No data"); + tvherror(LS_IPTV, "stdin pipe %d unexpectedly closed: %s", + rd, r < 0 ? strerror(errno) : "No data"); } else { /* avoid deadlock here */ pthread_mutex_unlock(&iptv_lock);