From: Andre Noll Date: Mon, 31 Mar 2008 17:08:34 +0000 (+0200) Subject: Fix afs shutdown. X-Git-Tag: v0.3.2~42 X-Git-Url: http://git.tue.mpg.de/?a=commitdiff_plain;h=78882bd94652b156e55e6385a33cd5126c439651;p=paraslash.git Fix afs shutdown. In case para_server dies, the afs process must unregister all tasks in order to shut down cleanly. --- 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; }