[FFmpeg-devel] [PATCH 2/3] doc/faq: add section on freezing terminal state

Ganesh Ajjanagadde gajjanag at mit.edu
Tue Aug 11 18:06:03 CEST 2015


On Tue, Aug 11, 2015 at 11:49 AM, Michael Niedermayer
<michael at niedermayer.cc> wrote:
> On Tue, Aug 11, 2015 at 10:46:31AM -0400, Ganesh Ajjanagadde wrote:
>> On Fri, Jul 31, 2015 at 8:38 AM, Ganesh Ajjanagadde
>> <gajjanagadde at gmail.com> wrote:
>> > Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>
>> > ---
>> >  doc/faq.texi | 20 ++++++++++++++++++++
>> >  1 file changed, 20 insertions(+)
>> >
>> > diff --git a/doc/faq.texi b/doc/faq.texi
>> > index 5fe716b..696c5b2 100644
>> > --- a/doc/faq.texi
>> > +++ b/doc/faq.texi
>> > @@ -149,6 +149,26 @@ Try a @code{make distclean} in the ffmpeg source directory before the build.
>> >  If this does not help see
>> >  (@url{http://ffmpeg.org/bugreports.html}).
>> >
>> > + at section Why does ffmpeg mess up my terminal when it crashes?
>
> This is added to the "frequently asked question" list
> Is this really a frequently asked question ?
> aka does this actually happen in real use cases with current FFmpeg?
>
> iam asking as iam interrested in investigating this if it does happen
> to see if it can be avoided.
> Messing up the terminal is pretty bad as many users probably dont know
> what/why and how to fix it and only few would read the faq/docs.
> I sure dont go hunt through docs if some application misbehaves.
> i tend to just uninstall such applications and use a different
> application if i have the choice

See https://ffmpeg.org/pipermail/ffmpeg-devel/2015-July/176475.html
for an example.
I can't comment on whether this is a real use case or not,
since I am not a heavy user of ffmpeg.
As for application trashing the terminal,
plenty of well known applications do, e.g
writing out a binary file on the console,
see e.g https://unix.stackexchange.com/questions/79684/fix-terminal-after-displaying-a-binary-file

Note that here it is by no means cat's fault,
there is no way it can do what it needs to do without trashing the terminal.
At such a point, the shell needs to step in.
Nicolas' point above shows that the same is true with ffmpeg:
ffmpeg can't and should not try restoring the tty in all cases.

As for whether this is a faq or not is a matter of debate.
I am perfectly fine placing it elsewhere if that is what people want.

>
>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> In fact, the RIAA has been known to suggest that students drop out
> of college or go to community college in order to be able to afford
> settlements. -- The RIAA
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>


More information about the ffmpeg-devel mailing list