Commit 0194cf13 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

VLC: remove false positives after fork()

parent 028bcb00
...@@ -26,13 +26,6 @@ ...@@ -26,13 +26,6 @@
void vlc_enable_override (void); void vlc_enable_override (void);
static bool override = false;
void vlc_enable_override (void)
{
override = true;
}
#if defined (__GNUC__) /* typeof and statement-expression */ \ #if defined (__GNUC__) /* typeof and statement-expression */ \
&& (defined (__ELF__) && !defined (__sun__)) && (defined (__ELF__) && !defined (__sun__))
/* Solaris crashes on printf("%s", NULL); which is legal, but annoying. */ /* Solaris crashes on printf("%s", NULL); which is legal, but annoying. */
...@@ -46,6 +39,19 @@ void vlc_enable_override (void) ...@@ -46,6 +39,19 @@ void vlc_enable_override (void)
# include <execinfo.h> # include <execinfo.h>
#endif #endif
static bool override = false;
static void vlc_reset_override (void)
{
override = false;
}
void vlc_enable_override (void)
{
override = true;
pthread_atfork (NULL, NULL, vlc_reset_override);
}
static void vlogbug (const char *level, const char *func, const char *fmt, static void vlogbug (const char *level, const char *func, const char *fmt,
va_list ap) va_list ap)
{ {
...@@ -186,4 +192,8 @@ int sigaction (int signum, const struct sigaction *act, struct sigaction *old) ...@@ -186,4 +192,8 @@ int sigaction (int signum, const struct sigaction *act, struct sigaction *old)
} }
#endif /* __ELF__ */ #else
static void vlc_enable_override (void)
{
}
#endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment