From 12f683937d03eb69034a3752fb0fddb749e506c5 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Sun, 31 Mar 2013 17:58:26 +0000 Subject: [PATCH] afs signal task: Switch to the alternative post select method. --- afs.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/afs.c b/afs.c index eb18708c..71b8b87e 100644 --- a/afs.c +++ b/afs.c @@ -723,9 +723,9 @@ static void signal_pre_select(struct sched *s, struct task *t) para_fd_set(st->fd, &s->rfds, &s->max_fileno); } -static void afs_signal_post_select(struct sched *s, struct task *t) +static int afs_signal_post_select(struct sched *s, __a_unused struct task *t) { - int signum; + int signum, ret; if (getppid() == 1) { PARA_EMERG_LOG("para_server died\n"); @@ -733,20 +733,20 @@ static void afs_signal_post_select(struct sched *s, struct task *t) } signum = para_next_signal(&s->rfds); if (signum == 0) - return; + return 0; if (signum == SIGHUP) { close_afs_tables(); parse_config_or_die(1); - t->error = open_afs_tables(); - if (t->error < 0) - return; + ret = open_afs_tables(); + if (ret < 0) + return ret; init_admissible_files(current_mop); - return; + return 0; } PARA_EMERG_LOG("terminating on signal %d\n", signum); shutdown: task_notify_all(s, E_AFS_SIGNAL); - t->error = -E_AFS_SIGNAL; + return -E_AFS_SIGNAL; } static void register_signal_task(struct sched *s) @@ -761,7 +761,8 @@ static void register_signal_task(struct sched *s) para_install_sighandler(SIGHUP); st->task.pre_select = signal_pre_select; - st->task.post_select = afs_signal_post_select; + st->task.new_post_select = afs_signal_post_select; + st->task.post_select = NULL; sprintf(st->task.status, "signal task"); register_task(s, &st->task); } -- 2.39.5