server signal task: Switch to the alternative post select method.
authorAndre Noll <maan@systemlinux.org>
Sun, 31 Mar 2013 17:47:26 +0000 (17:47 +0000)
committerAndre Noll <maan@systemlinux.org>
Tue, 30 Apr 2013 12:12:46 +0000 (14:12 +0200)
server.c

index 0744000..8ad2ccb 100644 (file)
--- 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");