]> git.ipfire.org Git - thirdparty/tvheadend.git/commitdiff
iptv: add some more traces for pipe fds...
authorJaroslav Kysela <perex@perex.cz>
Sat, 3 Nov 2018 09:25:02 +0000 (10:25 +0100)
committerJaroslav Kysela <perex@perex.cz>
Sat, 3 Nov 2018 09:25:24 +0000 (10:25 +0100)
src/input/mpegts/iptv/iptv.c
src/input/mpegts/iptv/iptv_pipe.c

index 5500c2305ccc9fa0205e43d4372a51c686c11d59..afdf0882059d57da34a1f9823ed91159b6fff3be 100644 (file)
@@ -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);
index 89f3a486c13d0a969208256eaa74dddf50082354..2cf334eb60215eab8b7489129c8c15e919de70e6 100644 (file)
@@ -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);