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

wm4 nfxjfg at googlemail.com
Mon Jul 27 16:11:31 CEST 2015


On Mon, 27 Jul 2015 08:30:38 -0400
Ganesh Ajjanagadde <gajjanag at mit.edu> wrote:

> On Mon, Jul 27, 2015 at 7:35 AM, wm4 <nfxjfg at googlemail.com> wrote:
> > On Mon, 27 Jul 2015 10:39:16 +0200
> > Nicolas George <george at nsup.org> wrote:
> >
> >
> >> > +    signal(SIGSEGV, sigterm_handler); /* Segmentation fault (ANSI).     */
> >> > +    signal(SIGILL , sigterm_handler); /* Invalid instruction (ANSI).    */
> >> > +    signal(SIGFPE , sigterm_handler); /* Arithmetic error (ANSI).       */
> >>
> >> NO!!!
> >>
> >> When a crash happens, we want it to happen right there, possibly leave a
> >> core. We do not want a signal handler to mess up the remains.
> >
> > +1
> >
> >> >  #ifdef SIGXCPU
> >> >      signal(SIGXCPU, sigterm_handler);
> >> >  #endif
> >
> > Why?
> 
> Not sure; note this was not added by me.
> From Kerrisk's "Linux Programming Interface" book,
> SIGXCPU is raised when CPU limit is exceeded.
> It is a Linux thing, relevant when RLIMIT_CPU is set.

You shouldn't just copy paste things you don't understand.


More information about the ffmpeg-devel mailing list