From ccef244fab11ebc96809b9de62e175b4d166b6e2 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 31 Mar 2013 17:47:26 +0000 Subject: [PATCH] server signal task: Switch to the alternative post select method. --- server.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/server.c b/server.c index 07440003..8ad2ccb6 100644 --- a/server.c +++ b/server.c @@ -278,13 +278,13 @@ static void handle_sighup(void) kill(mmd->afs_pid, SIGHUP); } -static void signal_post_select(struct sched *s, __a_unused struct task *t) +static int signal_post_select(struct sched *s, __a_unused struct task *t) { int signum = para_next_signal(&s->rfds); switch (signum) { case 0: - return; + return 0; case SIGHUP: handle_sighup(); break; @@ -329,6 +329,7 @@ cleanup: shm_detach(mmd); exit(EXIT_FAILURE); } + return 0; } static void init_signal_task(void) @@ -337,7 +338,8 @@ static void init_signal_task(void) *st = &signal_task_struct; st->task.pre_select = signal_pre_select; - st->task.post_select = signal_post_select; + st->task.new_post_select = signal_post_select; + st->task.post_select = NULL; sprintf(st->task.status, "signal task"); PARA_NOTICE_LOG("setting up signal handling\n"); -- 2.39.5