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 @@
void vlc_enable_override (void);
static bool override = false;
void vlc_enable_override (void)
{
override = true;
}
#if defined (__GNUC__) /* typeof and statement-expression */ \
&& (defined (__ELF__) && !defined (__sun__))
/* Solaris crashes on printf("%s", NULL); which is legal, but annoying. */
......@@ -46,6 +39,19 @@ void vlc_enable_override (void)
# include <execinfo.h>
#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,
va_list ap)
{
......@@ -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