X-Git-Url: http://git.tuebingen.mpg.de/?p=paraslash.git;a=blobdiff_plain;f=audiod.c;h=778318cebc2b8958e26b378987a4842c615a237d;hp=4a4a2ae70d307c6db2ca8779190277e6a8085271;hb=5b15980ce22a3a4244e2440f46eac19eb0ceb3ef;hpb=9e72df63eb0e5063e3cad1003599df1b5b9b5d62 diff --git a/audiod.c b/audiod.c index 4a4a2ae7..778318ce 100644 --- a/audiod.c +++ b/audiod.c @@ -980,19 +980,16 @@ static void signal_pre_select(struct sched *s, struct task *t) para_fd_set(st->fd, &s->rfds, &s->max_fileno); } -static void signal_post_select(struct sched *s, struct task *t) +static void signal_post_select(struct sched *s, __a_unused struct task *t) { - struct signal_task *st = container_of(t, struct signal_task, task); - - if (!FD_ISSET(st->fd, &s->rfds)) - return; + int signum; - st->signum = para_next_signal(); - switch (st->signum) { + signum = para_next_signal(&s->rfds); + switch (signum) { case SIGINT: case SIGTERM: case SIGHUP: - PARA_EMERG_LOG("terminating on signal %d\n", st->signum); + PARA_EMERG_LOG("terminating on signal %d\n", signum); clean_exit(EXIT_FAILURE, "caught deadly signal"); } } @@ -1023,9 +1020,7 @@ static void command_post_select(struct sched *s, struct task *t) last_status_dump = *now; } - if (!FD_ISSET(ct->fd, &s->rfds)) - return; - ret = handle_connect(ct->fd); + ret = handle_connect(ct->fd, &s->rfds); if (ret < 0) PARA_ERROR_LOG("%s\n", para_strerror(-ret)); audiod_status_dump();