[FFmpeg-devel] patch: log when hard exiting from too many signals.

Michael Niedermayer michaelni at gmx.at
Wed Jun 24 13:04:27 CEST 2015


On Wed, Jun 24, 2015 at 04:28:22AM -0600, Roger Pack wrote:
> If it looks worth anything, see attached (there's only one file).
> Thanks!

>  ffmpeg.c |    4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 76e781dafd7324903c7cc08dbf297bd95841126c  0002-log-error-message-when-shutting-down-from-too-many-s.patch
> From dad4f89ec0dc5bdeaeb1923e159fa12655bdde7a Mon Sep 17 00:00:00 2001
> From: rogerdpack <rogerpack2005 at gmail.com>
> Date: Wed, 24 Jun 2015 04:26:26 -0600
> Subject: [PATCH 2/2] log error message when shutting down from too many
>  signals
> 
> Signed-off-by: rogerdpack <rogerpack2005 at gmail.com>
> ---
>  ffmpeg.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/ffmpeg.c b/ffmpeg.c
> index 720e105..6aa5d1b 100644
> --- a/ffmpeg.c
> +++ b/ffmpeg.c
> @@ -324,8 +324,10 @@ sigterm_handler(int sig)
>      received_sigterm = sig;
>      received_nb_signals++;
>      term_exit_sigsafe();
> -    if(received_nb_signals > 3)
> +    if(received_nb_signals > 3){

> +        av_log(NULL, AV_LOG_ERROR, "Received %d shutdown signals, hard exiting.", received_nb_signals);

i think its better to use fprintf(stderr,...
here instead of av_log()

when things are already stuck for some reason staying with the
simpler, lower level code seems more robust to me

[...]

-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

In a rich man's house there is no place to spit but his face.
-- Diogenes of Sinope
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: Digital signature
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20150624/6a2a0b00/attachment.asc>


More information about the ffmpeg-devel mailing list