]> git.sesse.net Git - vlc/commitdiff
vlc_thread_fatal: disable thread cancellation
authorRémi Denis-Courmont <remi@remlab.net>
Tue, 20 Oct 2009 20:37:36 +0000 (23:37 +0300)
committerRémi Denis-Courmont <remi@remlab.net>
Tue, 20 Oct 2009 20:37:36 +0000 (23:37 +0300)
It shouldn't matter much when we get to such a sorry code path, but
better safe than sorry.

src/misc/pthread.c

index ce604f427a21f2d0fad163040473c8cfc9801d91..137916362b3fdeeb3ce0e3afcdc1e7cdcc4d1165 100644 (file)
@@ -89,6 +89,7 @@ static void
 vlc_thread_fatal (const char *action, int error,
                   const char *function, const char *file, unsigned line)
 {
+    int canc = vlc_savecancel ();
     fprintf (stderr, "LibVLC fatal error %s (%d) in thread %lu ",
              action, error, vlc_threadid ());
     vlc_trace (function, file, line);
@@ -119,6 +120,7 @@ vlc_thread_fatal (const char *action, int error,
 #endif
     fflush (stderr);
 
+    vlc_restorecancel (canc);
     abort ();
 }