[FFmpeg-devel] [PATCH] ffmpeg.c: use sigterm_handler with sigpipe
Carl Eugen Hoyos
ceffmpeg at gmail.com
Thu Jan 18 17:16:41 EET 2018
2018-01-18 16:05 GMT+01:00 Nicolas George <george at nsup.org>:
> Carl Eugen Hoyos (2018-01-18):
>> Would you like to elaborate?
> Of course, provided somebody is interested.
> Issuing the following command:
> trap "" SIGPIPE
> will ignore SIGPIPE in the shell and all subsequent programs started
> from it.
> It will achieve exactly the result of this patch
Dave's patch and your shell command above behave differently here.
> in a much cleaner way, without impacting others users.
It now terminates with an error message instead of succeeding.
Why is that cleaner?
>> Maybe you could explain the drawbacks?
> No, I cannot. I only know they exist, because signals on Unix are like
> that. In this instance, I consider the burden of the proof to be on the
> person who proposes the patch.
> Still, there is always the fact that it changes the behaviour in a
> significant way, possibly resulting in process running indefinitely
> where they were stopping previously.
Why do you think so?
The OP has created a very easy to reproduce case where
FFmpeg unexpectedly doesn't close its output files, and
a patch that fixes this (broken) behaviour.
Why do you believe there is an indefinitely running process
More information about the ffmpeg-devel