Parental advisory: explicit hack.
If kfilemodule is loaded, bypass run cleanup handlers. Library really
should not use this C feature in any case (IMHO). And I find it
outright idiotic for a (Qt4) plugin to use cleanup handlers.
This is causing so many crash reports that it's not funny anymore:
https://bugs.launchpad.net/ubuntu/+source/vlc/+bug/408719
if HAVE_WIN32
vlc_LDADD += -lwininet vlc_win32_rc.$(OBJEXT)
vlc_DEPENDENCIES += vlc_win32_rc.$(OBJEXT)
if HAVE_WIN32
vlc_LDADD += -lwininet vlc_win32_rc.$(OBJEXT)
vlc_DEPENDENCIES += vlc_win32_rc.$(OBJEXT)
endif
.rc.in.rc: $(top_builddir)/config.status
endif
.rc.in.rc: $(top_builddir)/config.status
#include <time.h>
#include <pthread.h>
#include <unistd.h>
#include <time.h>
#include <pthread.h>
#include <unistd.h>
/*****************************************************************************
* main: parse command line, start interface and spawn threads.
/*****************************************************************************
* main: parse command line, start interface and spawn threads.
for (int i = 1; i < argc; i++)
LocaleFree (argv[i]);
for (int i = 1; i < argc; i++)
LocaleFree (argv[i]);
+#ifdef RTLD_NOLOAD
+ /* Avoid crash in KIO scheduler cleanup. */
+ /* This is ugly, but we get way too many crash reports due to this. */
+ if (dlopen ("libkfilemodule.so", RTLD_LAZY|RTLD_LOCAL|RTLD_NOLOAD) != NULL)
+ {
+ fprintf (stderr, "KFile plugin present. Unclean shutdown!\n");
+ _exit (0);
+ }
+#endif