-
Notifications
You must be signed in to change notification settings - Fork 874
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Registering SIGINT handler to cleanly exit application doesn't work because ffmpeg gets killed right away #644
Comments
What are you doing in your handler ? |
It's just a one liner, it sets a flag to instruct the main application loop that it can cleanly end before the next iteration of the loop. |
Hi, i'm having the same issue. A solution would be to have the Basically, you send a signal to your process, it won't propagate to your child if you give him the |
Closing as this is getting a bit old. |
I have the same issue, need a detached process. |
OK, I did PR - #1073 However, that didn't help me with SIGTERM on docker, I assume because the stdout and stderr are piped to the parent process which nullifies the detached option. |
In my application I've done
process.on('SIGINT', mySigintHandler)
to cleanly exit the application when the current tasks have finished rather than killing the application immediately and leaving the tasks in an inconsistent state.However, as soon as I do
ctrl+c
in the console, the application doesn't cleanly exit because ffmpeg is killed right away. The error messages I get depend on when exactly it's killed. A few examplesffmpeg exited with code 1: /tmp/video100.mp4: Immediate exit requested
ffmpeg exited with code 1: /tmp/video100.mp4: Input/output error
ffmpeg exited with code 255: Press [q] to stop, [?] for help
How can I disable the automatic terminating of ffmpeg so that I can kill them from my SIGINT handler? This would be a useful feature to add if it's not possible currently.
The text was updated successfully, but these errors were encountered: