X-Git-Url: http://git.tuebingen.mpg.de/?a=blobdiff_plain;f=server.c;h=09087f7a72396bf01e51782dbebc1b9d1a82eb7c;hb=2bad70d84e763b4d866d7b97dbc1cdc8e030bd45;hp=c86778cd0cd52e6b8b50b1d2c86ef294c2ff42d7;hpb=12f3368848dadafec9f00a137feff7f3597939be;p=paraslash.git diff --git a/server.c b/server.c index c86778cd..09087f7a 100644 --- a/server.c +++ b/server.c @@ -298,14 +298,14 @@ static int signal_post_select(struct sched *s, __a_unused void *context) if (pid != afs_pid) continue; PARA_EMERG_LOG("fatal: afs died\n"); - kill(0, SIGTERM); - goto cleanup; + goto genocide; } break; /* die on sigint/sigterm. Kill all children too. */ case SIGINT: case SIGTERM: PARA_EMERG_LOG("terminating on signal %d\n", signum); +genocide: kill(0, SIGTERM); /* * We must wait for all of our children to die. For the afs @@ -320,7 +320,6 @@ static int signal_post_select(struct sched *s, __a_unused void *context) while (wait(NULL) != -1 || errno != ECHILD) ; /* still at least one child alive */ mutex_lock(mmd_mutex); -cleanup: free(mmd->afd.afhi.chunk_table); task_notify_all(s, E_DEADLY_SIGNAL); return -E_DEADLY_SIGNAL;