Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Steve Lhomme
VLC
Commits
0f6073f9
Commit
0f6073f9
authored
Mar 25, 2007
by
Rémi Denis-Courmont
Browse files
Rename sigset_t variables. No run-time change.
parent
31e57614
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/vlc.c
View file @
0f6073f9
...
...
@@ -101,24 +101,23 @@ int main( int i_argc, char *ppsz_argv[] )
* and force an unclean shutdown if they are triggered again 2+ seconds
* later. We have to handle SIGTERM cleanly because of daemon mode.
* Note that we set the signals after the vlc_create call. */
static
const
int
sigs
[]
=
{
SIGINT
,
SIGHUP
,
SIGQUIT
,
SIGTERM
};
/* Ignored signals */
static
const
int
ignored
[]
=
{
SIGALRM
,
SIGPIPE
,
SIGCHLD
};
static
const
int
exitsigs
[]
=
{
SIGINT
,
SIGHUP
,
SIGQUIT
,
SIGTERM
};
static
const
int
dummysigs
[]
=
{
SIGALRM
,
SIGPIPE
,
SIGCHLD
};
sigset_t
set
;
pthread_t
sigth
;
sigemptyset
(
&
set
);
for
(
unsigned
i
=
0
;
i
<
sizeof
(
sigs
)
/
sizeof
(
sigs
[
0
]);
i
++
)
sigaddset
(
&
set
,
sigs
[
i
]);
for
(
unsigned
i
=
0
;
i
<
sizeof
(
ignored
)
/
sizeof
(
ignored
[
0
]);
i
++
)
sigaddset
(
&
set
,
ignored
[
i
]);
for
(
unsigned
i
=
0
;
i
<
sizeof
(
exit
sigs
)
/
sizeof
(
exit
sigs
[
0
]);
i
++
)
sigaddset
(
&
set
,
exit
sigs
[
i
]);
for
(
unsigned
i
=
0
;
i
<
sizeof
(
dummysigs
)
/
sizeof
(
dummysigs
[
0
]);
i
++
)
sigaddset
(
&
set
,
dummysigs
[
i
]);
/* Block all these signals */
pthread_sigmask
(
SIG_BLOCK
,
&
set
,
NULL
);
for
(
unsigned
i
=
0
;
i
<
sizeof
(
ignored
)
/
sizeof
(
ignored
[
0
]);
i
++
)
sigdelset
(
&
set
,
ignored
[
i
]);
for
(
unsigned
i
=
0
;
i
<
sizeof
(
dummysigs
)
/
sizeof
(
dummysigs
[
0
]);
i
++
)
sigdelset
(
&
set
,
dummysigs
[
i
]);
pthread_create
(
&
sigth
,
NULL
,
SigHandler
,
&
set
);
#endif
...
...
Write
Preview
Supports
Markdown
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