Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc-gpu
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-gpu
Commits
d10ea719
Commit
d10ea719
authored
Aug 31, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dequeue "dummy" signals
parent
0b1c15a3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
src/vlc.c
src/vlc.c
+9
-3
No files found.
src/vlc.c
View file @
d10ea719
...
...
@@ -233,13 +233,16 @@ int main( int i_argc, char *ppsz_argv[] )
*****************************************************************************/
static
void
*
SigHandler
(
void
*
data
)
{
const
sigset_t
*
set
=
(
sigset_t
*
)
data
;
const
sigset_t
*
exitset
=
(
sigset_t
*
)
data
;
sigset_t
fullset
;
time_t
abort_time
=
0
;
pthread_sigmask
(
SIG_BLOCK
,
exitset
,
&
fullset
);
for
(;;)
{
int
i_signal
,
state
;
(
void
)
sigwait
(
set
,
&
i_signal
);
(
void
)
sigwait
(
&
full
set
,
&
i_signal
);
#ifdef __APPLE__
/* In Mac OS X up to 10.4.8 sigwait (among others) is not a pthread
...
...
@@ -247,6 +250,9 @@ static void *SigHandler (void *data)
pthread_testcancel
();
#endif
if
(
!
sigismember
(
exitset
,
i_signal
))
continue
;
/* Ignore "dummy" signals */
/* Once a signal has been trapped, the termination sequence will be
* armed and subsequent signals will be ignored to avoid sending
* signals to a libvlc structure having been destroyed */
...
...
@@ -267,7 +273,7 @@ static void *SigHandler (void *data)
if
(
time
(
NULL
)
<=
abort_time
)
{
/* If user asks again more than 2 seconds later, die badly */
pthread_sigmask
(
SIG_UNBLOCK
,
set
,
NULL
);
pthread_sigmask
(
SIG_UNBLOCK
,
exit
set
,
NULL
);
fprintf
(
stderr
,
"user insisted too much, dying badly
\n
"
);
abort
();
}
...
...
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