ffmpeg: log error message when shutting down from too many signals
authorrogerdpack <rogerpack2005@gmail.com>
Thu, 25 Jun 2015 10:22:10 +0000 (12:22 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Thu, 25 Jun 2015 10:23:29 +0000 (12:23 +0200)
write() suggested by wm4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
ffmpeg.c

index 1cf4487..fae5f0f 100644 (file)
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -321,8 +321,11 @@ sigterm_handler(int sig)
     received_sigterm = sig;
     received_nb_signals++;
     term_exit_sigsafe();
-    if(received_nb_signals > 3)
+    if(received_nb_signals > 3) {
+        write(STDERR_FILENO, "Received > 3 system signals, hard exiting\n",
+                      strlen("Received > 3 system signals, hard exiting\n"));
         exit(123);
+    }
 }
 
 void term_init(void)