Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
209c152e
Commit
209c152e
authored
Apr 11, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Safety checks for X11 error handlers
parent
f3bef788
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
37 additions
and
0 deletions
+37
-0
bin/override.c
bin/override.c
+37
-0
No files found.
bin/override.c
View file @
209c152e
...
@@ -192,6 +192,43 @@ int sigaction (int signum, const struct sigaction *act, struct sigaction *old)
...
@@ -192,6 +192,43 @@ int sigaction (int signum, const struct sigaction *act, struct sigaction *old)
}
}
/*** Xlib ****/
#ifdef HAVE_X11_XLIB_H
# include <X11/Xlib.h>
static
pthread_mutex_t
xlib_lock
=
PTHREAD_MUTEX_INITIALIZER
;
int
(
*
XSetErrorHandler
(
int
(
*
handler
)
(
Display
*
,
XErrorEvent
*
)))
(
Display
*
,
XErrorEvent
*
)
{
if
(
override
)
{
int
(
*
ret
)
(
Display
*
,
XErrorEvent
*
);
pthread_mutex_lock
(
&
xlib_lock
);
LOG
(
"Error"
,
"%p"
,
handler
);
ret
=
CALL
(
XSetErrorHandler
,
handler
);
pthread_mutex_unlock
(
&
xlib_lock
);
return
ret
;
}
return
CALL
(
XSetErrorHandler
,
handler
);
}
int
(
*
XSetIOErrorHandler
(
int
(
*
handler
)
(
Display
*
)))
(
Display
*
)
{
if
(
override
)
{
int
(
*
ret
)
(
Display
*
);
pthread_mutex_lock
(
&
xlib_lock
);
LOG
(
"Error"
,
"%p"
,
handler
);
ret
=
CALL
(
XSetIOErrorHandler
,
handler
);
pthread_mutex_unlock
(
&
xlib_lock
);
return
ret
;
}
return
CALL
(
XSetIOErrorHandler
,
handler
);
}
#endif
#else
#else
static
void
vlc_enable_override
(
void
)
static
void
vlc_enable_override
(
void
)
{
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment