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
0f6073f9
Commit
0f6073f9
authored
Mar 25, 2007
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Rename sigset_t variables. No run-time change.
parent
31e57614
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
9 deletions
+8
-9
src/vlc.c
src/vlc.c
+8
-9
No files found.
src/vlc.c
View file @
0f6073f9
...
@@ -101,24 +101,23 @@ int main( int i_argc, char *ppsz_argv[] )
...
@@ -101,24 +101,23 @@ int main( int i_argc, char *ppsz_argv[] )
* and force an unclean shutdown if they are triggered again 2+ seconds
* and force an unclean shutdown if they are triggered again 2+ seconds
* later. We have to handle SIGTERM cleanly because of daemon mode.
* later. We have to handle SIGTERM cleanly because of daemon mode.
* Note that we set the signals after the vlc_create call. */
* Note that we set the signals after the vlc_create call. */
static
const
int
sigs
[]
=
{
SIGINT
,
SIGHUP
,
SIGQUIT
,
SIGTERM
};
static
const
int
exitsigs
[]
=
{
SIGINT
,
SIGHUP
,
SIGQUIT
,
SIGTERM
};
/* Ignored signals */
static
const
int
dummysigs
[]
=
{
SIGALRM
,
SIGPIPE
,
SIGCHLD
};
static
const
int
ignored
[]
=
{
SIGALRM
,
SIGPIPE
,
SIGCHLD
};
sigset_t
set
;
sigset_t
set
;
pthread_t
sigth
;
pthread_t
sigth
;
sigemptyset
(
&
set
);
sigemptyset
(
&
set
);
for
(
unsigned
i
=
0
;
i
<
sizeof
(
sigs
)
/
sizeof
(
sigs
[
0
]);
i
++
)
for
(
unsigned
i
=
0
;
i
<
sizeof
(
exitsigs
)
/
sizeof
(
exit
sigs
[
0
]);
i
++
)
sigaddset
(
&
set
,
sigs
[
i
]);
sigaddset
(
&
set
,
exit
sigs
[
i
]);
for
(
unsigned
i
=
0
;
i
<
sizeof
(
ignored
)
/
sizeof
(
ignored
[
0
]);
i
++
)
for
(
unsigned
i
=
0
;
i
<
sizeof
(
dummysigs
)
/
sizeof
(
dummysigs
[
0
]);
i
++
)
sigaddset
(
&
set
,
ignored
[
i
]);
sigaddset
(
&
set
,
dummysigs
[
i
]);
/* Block all these signals */
/* Block all these signals */
pthread_sigmask
(
SIG_BLOCK
,
&
set
,
NULL
);
pthread_sigmask
(
SIG_BLOCK
,
&
set
,
NULL
);
for
(
unsigned
i
=
0
;
i
<
sizeof
(
ignored
)
/
sizeof
(
ignored
[
0
]);
i
++
)
for
(
unsigned
i
=
0
;
i
<
sizeof
(
dummysigs
)
/
sizeof
(
dummysigs
[
0
]);
i
++
)
sigdelset
(
&
set
,
ignored
[
i
]);
sigdelset
(
&
set
,
dummysigs
[
i
]);
pthread_create
(
&
sigth
,
NULL
,
SigHandler
,
&
set
);
pthread_create
(
&
sigth
,
NULL
,
SigHandler
,
&
set
);
#endif
#endif
...
...
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