Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-2-2
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-2-2
Commits
2eb05547
Commit
2eb05547
authored
Apr 11, 2010
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Log dangerous registration of signal handlers
parent
4213a133
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
0 deletions
+26
-0
bin/override.c
bin/override.c
+26
-0
No files found.
bin/override.c
View file @
2eb05547
...
@@ -147,4 +147,30 @@ int rand (void)
...
@@ -147,4 +147,30 @@ int rand (void)
}
}
/** Signals **/
#include <signal.h>
void
(
*
signal
(
int
signum
,
void
(
*
handler
)
(
int
)))
(
int
)
{
if
(
override
)
{
const
char
*
msg
=
"Error"
;
if
((
signum
==
SIGPIPE
&&
handler
==
SIG_IGN
)
||
(
signum
!=
SIGPIPE
&&
handler
==
SIG_DFL
))
/* Same settings we already use */
msg
=
"Warning"
;
LOG
(
msg
,
"%d, %p"
,
signum
,
handler
);
}
return
CALL
(
signal
,
signum
,
handler
);
}
int
sigaction
(
int
signum
,
const
struct
sigaction
*
act
,
struct
sigaction
*
old
)
{
if
(
act
!=
NULL
)
LOG
(
"Error"
,
"%d, %p, %p"
,
signum
,
act
,
old
);
return
CALL
(
sigaction
,
signum
,
act
,
old
);
}
#endif
/* __ELF__ */
#endif
/* __ELF__ */
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