diff options
author | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2018-11-28 16:01:40 +0200 |
---|---|---|
committer | Luiz Augusto von Dentz <luiz.von.dentz@intel.com> | 2018-12-05 08:55:26 -0300 |
commit | b597afa45a40ed2720659649e77dd25b45383fc0 (patch) | |
tree | 583c4a846d826d0e23b866408e512747c7470009 /peripheral | |
parent | 5202ea57a8fda7b298bb920a05c349897377abc1 (diff) | |
download | bluez-b597afa45a40ed2720659649e77dd25b45383fc0.tar.gz |
shared/mainloop: Remove mainloop_set_signal
This removes mainloop_set_signal and replaces it usage with
mainloop_run_with_signal.
Diffstat (limited to 'peripheral')
-rw-r--r-- | peripheral/main.c | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/peripheral/main.c b/peripheral/main.c index d7e10f3d3..93abe2042 100644 --- a/peripheral/main.c +++ b/peripheral/main.c @@ -184,7 +184,6 @@ static void signal_callback(int signum, void *user_data) int main(int argc, char *argv[]) { - sigset_t mask; int exit_status; if (getpid() == 1 && getppid() == 0) @@ -192,13 +191,6 @@ int main(int argc, char *argv[]) mainloop_init(); - sigemptyset(&mask); - sigaddset(&mask, SIGINT); - sigaddset(&mask, SIGTERM); - sigaddset(&mask, SIGCHLD); - - mainloop_set_signal(&mask, signal_callback, NULL, NULL); - printf("Bluetooth periperhal ver %s\n", VERSION); prepare_filesystem(); @@ -235,7 +227,7 @@ int main(int argc, char *argv[]) if (is_init) attach_start(); - exit_status = mainloop_run(); + exit_status = mainloop_run_with_signal(signal_callback, NULL); if (is_init) attach_stop(); |