Re: [FFmpeg-devel] [PATCH 1/2] ffmpeg: reset tty state correctly

2015-07-27 Thread Ganesh Ajjanagadde
On Mon, Jul 27, 2015 at 10:11 AM, wm4 wrote: > On Mon, 27 Jul 2015 08:30:38 -0400 > Ganesh Ajjanagadde wrote: > >> On Mon, Jul 27, 2015 at 7:35 AM, wm4 wrote: >> > On Mon, 27 Jul 2015 10:39:16 +0200 >> > Nicolas George wrote: >> > >> > >> >> > +signal(SIGSEGV, sigterm_handler); /* Segmentat

Re: [FFmpeg-devel] [PATCH 1/2] ffmpeg: reset tty state correctly

2015-07-27 Thread wm4
On Mon, 27 Jul 2015 10:16:04 -0400 Ganesh Ajjanagadde wrote: > On Mon, Jul 27, 2015 at 10:11 AM, wm4 wrote: > > On Mon, 27 Jul 2015 08:30:38 -0400 > > Ganesh Ajjanagadde wrote: > > > >> On Mon, Jul 27, 2015 at 7:35 AM, wm4 wrote: > >> > On Mon, 27 Jul 2015 10:39:16 +0200 > >> > Nicolas George

Re: [FFmpeg-devel] [PATCH 1/2] ffmpeg: reset tty state correctly

2015-07-27 Thread wm4
On Mon, 27 Jul 2015 08:30:38 -0400 Ganesh Ajjanagadde wrote: > On Mon, Jul 27, 2015 at 7:35 AM, wm4 wrote: > > On Mon, 27 Jul 2015 10:39:16 +0200 > > Nicolas George wrote: > > > > > >> > +signal(SIGSEGV, sigterm_handler); /* Segmentation fault (ANSI). > >> > */ > >> > +signal(SIGIL

Re: [FFmpeg-devel] [PATCH 1/2] ffmpeg: reset tty state correctly

2015-07-27 Thread Ganesh Ajjanagadde
On Mon, Jul 27, 2015 at 7:35 AM, wm4 wrote: > On Mon, 27 Jul 2015 10:39:16 +0200 > Nicolas George wrote: > > >> > +signal(SIGSEGV, sigterm_handler); /* Segmentation fault (ANSI). */ >> > +signal(SIGILL , sigterm_handler); /* Invalid instruction (ANSI).*/ >> > +signal(SIGFPE ,

Re: [FFmpeg-devel] [PATCH 1/2] ffmpeg: reset tty state correctly

2015-07-27 Thread wm4
On Mon, 27 Jul 2015 10:39:16 +0200 Nicolas George wrote: > > +signal(SIGSEGV, sigterm_handler); /* Segmentation fault (ANSI). */ > > +signal(SIGILL , sigterm_handler); /* Invalid instruction (ANSI).*/ > > +signal(SIGFPE , sigterm_handler); /* Arithmetic error (ANSI). */

Re: [FFmpeg-devel] [PATCH 1/2] ffmpeg: reset tty state correctly

2015-07-27 Thread Nicolas George
L'octidi 8 thermidor, an CCXXIII, Ganesh Ajjanagadde a écrit : > +abort(); Sorry to not have noticed it before: abort() is not in the list of async-signal-safe functions, see: http://pubs.opengroup.org/onlinepubs/009695399/functions/xsh_chap02_04.html But the specification for abort(

Re: [FFmpeg-devel] [PATCH 1/2] ffmpeg: reset tty state correctly

2015-07-27 Thread Nicolas George
L'octidi 8 thermidor, an CCXXIII, Ganesh Ajjanagadde a écrit : > tty state was not being reset upon "hard" signals (SIGSEGV etc) A good shell can do that for you. > This resets tty state in such situations, fixes Ticket2964 This ticket is only about tcsetattr() not putting the tty in raw mode wh

[FFmpeg-devel] [PATCH 1/2] ffmpeg: reset tty state correctly

2015-07-26 Thread Ganesh Ajjanagadde
tty state was not being reset upon "hard" signals (SIGSEGV etc) This resets tty state in such situations, fixes Ticket2964 Signed-off-by: Ganesh Ajjanagadde --- ffmpeg.c | 38 -- 1 file changed, 28 insertions(+), 10 deletions(-) diff --git a/ffmpeg.c b/ffmpeg