-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
runOnDemand command doesn't stop the processes executed from the win10 batch #3004
Comments
I ran into this also with linux and having a bash script as the runondemand command, but once I moved all the code out of the script into the yaml directly it worked. it would be nice to have the bash script get terminated as well. |
I've also found this happening in Linux. The best workaround I have is to make the bash script have a |
Great that worked for you, bringing the script into yaml :) I tried that before in windows, but somehow couldn't convert the script into yaml which gave me errors. The pipe part(updated above) didn't work I guess. |
Hello, after replicating the issue on both Linux and Windows, it turned out that MediaMTX does indeed send the kill signal to the process written inside In case of commands wrapped inside shell scripts like In order to ease the integration with third-party software, i wrote a patch that propagates the kill signal to subprocesses too, and this should solve the issue on all supported operating systems. Contrarily to what reported in this thread, closing subprocesses was never a feature of rtsp-simple-server. |
Thank you for your support of coming out with a fix. I will test it once after the next release comes out. |
This issue is mentioned in release v1.6.0 🚀 |
After testing, I am not really sure if runOnDemandCloseAfter is kicking in exactly after 30s, as per my config, but I can see the processes are closing around that timeframe, thanks! |
This issue is being locked automatically because it has been closed for more than 6 months. |
Which version are you using?
v1.5.1
Which operating system are you using?
Describe the issue
A batch file , which consist of a streamlink -> ffmpeg pipe as source to mediamtx, is successfully called at runOnDemand, but doesn't close the processes after the time of runOnDemandCloseAfter.
Setup is,
Inside of stream1.bat is like,
Describe how to replicate the issue
Happens everytime I access the stream from the client.
If mediamtx is terminated, the processes will terminate too.
It used to work before but started to fail to terminate the processes I think from the last version of rtsp-simple-server or around that.
Did you attach the server logs?
I see in the log,
runOnDemand command stopped: not needed by anyone,
but doesn't terminate the child processes.
Did you attach a network dump?
no
The text was updated successfully, but these errors were encountered: