[MPlayer-dev-eng] [PATCH] Abort on Fatal Messages

Tobias Diedrich ranma at tdiedrich.de
Wed Mar 9 23:57:14 CET 2011


Reimar Döffinger wrote:
> On Wed, Mar 09, 2011 at 07:47:18PM +0100, Tobias Diedrich wrote:
> > Abort on fatal messages.
> > 
> > mp_msg.h says we abort on fatal messages, but we currently don't.
> 
> No, the comment means that that level should be used for conditions
> that will cause exit/abort, not that using that level will do it.
> Also it really shouldn't abort in almost all cases but exit cleanly.
> I think abort will cause the terminal be messed up, that is extremely
> annoying for users.

The terminal is ok, since the exit_sighandler is invoked with
SIGABORT and cleans up the terminal settings.

I'd argue that trying to exit cleanly in cases like failing malloc()
etc is unneeded complexity (except for cases like vidix where we
really should try our best to make  sure that the hardware is in a
sane state before exiting).

Anything where we will have to do cleanups by hand is already broken
when we segfault for some reason.

And exiting upon fatal message makes sure the fatal message is easy
for the user to see.

A lot of the ~350 MSGL_FATAL seem to be about failed memory
allocations.

-- 
Tobias						PGP: http://8ef7ddba.uguu.de


More information about the MPlayer-dev-eng mailing list