From 78882bd94652b156e55e6385a33cd5126c439651 Mon Sep 17 00:00:00 2001 From: Andre Noll Date: Mon, 31 Mar 2008 19:08:34 +0200 Subject: [PATCH] Fix afs shutdown. In case para_server dies, the afs process must unregister all tasks in order to shut down cleanly. --- afs.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/afs.c b/afs.c index 0454b8ef..03a8d4b9 100644 --- a/afs.c +++ b/afs.c @@ -763,8 +763,8 @@ static void signal_post_select(struct sched *s, struct task *t) { struct signal_task *st = container_of(t, struct signal_task, task); if (getppid() == 1) { - t->error = -E_AFS_PARENT_DIED; - return; + PARA_EMERG_LOG("para_server died\n"); + goto shutdown; } if (!FD_ISSET(st->fd, &s->rfds)) return; @@ -777,6 +777,8 @@ static void signal_post_select(struct sched *s, struct task *t) init_admissible_files(current_mop); return; } + PARA_EMERG_LOG("terminating on signal %d\n", st->signum); +shutdown: sched_shutdown(); t->error = -E_AFS_SIGNAL; } -- 2.39.5