Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Vladislav Rykov
THSO.gateway
Commits
c88de8c1
Commit
c88de8c1
authored
Oct 30, 2020
by
Vladislav Rykov
Browse files
signals and threads issue cleared up
parent
cb424704
Changes
2
Show whitespace changes
Inline
Side-by-side
bin/gateway
View file @
c88de8c1
No preview for this file type
src/gateway.c
View file @
c88de8c1
...
@@ -121,11 +121,8 @@ int main (int argc, char **argv) {
...
@@ -121,11 +121,8 @@ int main (int argc, char **argv) {
sigset_t
sigset
;
sigset_t
sigset
;
sigemptyset
(
&
sigset
);
sigemptyset
(
&
sigset
);
/* SIGINT for finishing gateway task */
/* block SIGALRM for gateway manager thread */
sigaddset
(
&
sigset
,
SIGINT
);
/* SIGALRM for gateway manager thread */
sigaddset
(
&
sigset
,
SIGALRM
);
sigaddset
(
&
sigset
,
SIGALRM
);
/* block all other signals */
sigprocmask
(
SIG_BLOCK
,
&
sigset
,
NULL
);
sigprocmask
(
SIG_BLOCK
,
&
sigset
,
NULL
);
signal
(
SIGINT
,
ctrc_handler
);
signal
(
SIGINT
,
ctrc_handler
);
...
@@ -461,7 +458,6 @@ void * gateway_mngr(void *gw_conf) {
...
@@ -461,7 +458,6 @@ void * gateway_mngr(void *gw_conf) {
sigemptyset
(
&
alarm_msk
);
sigemptyset
(
&
alarm_msk
);
sigaddset
(
&
alarm_msk
,
SIGALRM
);
sigaddset
(
&
alarm_msk
,
SIGALRM
);
pthread_sigmask
(
SIG_BLOCK
,
&
alarm_msk
,
NULL
);
tval
.
it_value
.
tv_sec
=
period
;
tval
.
it_value
.
tv_sec
=
period
;
tval
.
it_value
.
tv_usec
=
0
;
tval
.
it_value
.
tv_usec
=
0
;
...
...
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