[MPlayer-dev-eng] [PATCH] exit_player
Jan Knutar
jknutar at nic.fi
Thu Sep 9 18:20:51 CEST 2004
On Thursday 12 August 2004 03:29, Joey Parrish wrote:
> Hello,
>
> This patch changes all exit() calls to exit_player() so that clean-up
> always gets done right.
>
> I just think this is a good idea in general.
>
> --Joey
>- if(sig_count==5 || (inited_flags==0 && sig_count>1)) exit(1);
>+ if(sig_count==5 || (inited_flags==0 && sig_count>1)) exit_player(NULL);
This is a special case. You don't want to change it to exit_player() here, because
the sig_count==5 check means that we already tried 5 times to exit_player, but
crashed each attempt. Therefore, we now try plain exit(), and if you read the code
further on, you'll see if that ALSO fail, we then resort to kill -9 ourselves.
More information about the MPlayer-dev-eng
mailing list