[FFmpeg-devel] [PATCH 2/3] ffmpeg: do not set tty mode if interaction is disabled.

Nicolas George george at nsup.org
Sun Mar 13 12:07:47 CET 2016


Fix SIGTTOU when used in background with -nostdin but no </dev/null.

Signed-off-by: Nicolas George <george at nsup.org>
---
 ffmpeg.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ffmpeg.c b/ffmpeg.c
index 1887946..45a22fa 100644
--- a/ffmpeg.c
+++ b/ffmpeg.c
@@ -366,7 +366,7 @@ static BOOL WINAPI CtrlHandler(DWORD fdwCtrlType)
 void term_init(void)
 {
 #if HAVE_TERMIOS_H
-    if(!run_as_daemon){
+    if(stdin_interaction && !run_as_daemon){
         struct termios tty;
         if (tcgetattr (0, &tty) == 0) {
             oldtty = tty;
-- 
2.7.0



More information about the ffmpeg-devel mailing list