I've added logging of the process' exit status, signal/code, etc. so that
should help. `stderr` is already redirected to the logs but on level `5` only.
As for the differences, I'm not sure. Most of this code was entirely reworked a
couple of years ago to use a common codebase. The difficulty with handling
external processes is that the unix standard doesn't give many significant ways
to properly close a process. The only way to do so without risking to loose
data is to close `stdin` and read `std{out,err}` until reaching the end of
stream (which, itself, only manifests when a `read` call returns `0` bytes --
and those calls can be blocking).
This is made even more complicated by the fact that, in order to insert
metadata at the right point, when metadata come through the incoming stream, we
have to:
- Close the process's `stdin`
- Read all remaining data from `stdout`
- Insert metadata
- Restart process
That makes the whole system even more prone to getting stuck waiting for the
process to close.
This my suggestion to simply ditch metadata and also merge all tracks if you
don't care about that part. This way, there should ever be only one single
`pipe`d process and not such trouble.
Hope that makes sense.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/savonet/liquidsoap/issues/607#issuecomment-414653955
------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Savonet-users mailing list
Savonet-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/savonet-users