From: Frank Lahm Date: Sun, 1 May 2011 17:53:40 +0000 (+0200) Subject: only forward SIGTERM and SIGUSR1 from parent to childs X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=netatalk.git;a=commitdiff_plain;h=75f0882aca367c96283169457942696927fbd8fd only forward SIGTERM and SIGUSR1 from parent to childs --- diff --git a/NEWS b/NEWS index bb5b26e3..f8d92829 100644 --- a/NEWS +++ b/NEWS @@ -4,6 +4,7 @@ Changes in 2.2 * UPD: Support for Berkeley DB 5.1 * UPD: case-conversion is based on Unicode 6.0.0 * UPD: cnid_metad: allow up to 4096 volumes +* UPD: afpd: only forward SIGTERM and SIGUSR1 from parent to childs * FIX: afpd: configuration reload with SIGHUP * FIX: afpd: crashes in the dircache * FIX: afpd: Correct afp logout vs dsi eof behaviour diff --git a/etc/afpd/main.c b/etc/afpd/main.c index 7bee91f2..9e34712e 100644 --- a/etc/afpd/main.c +++ b/etc/afpd/main.c @@ -114,14 +114,16 @@ static void afp_goaway(int sig) asp_kill(sig); #endif /* ! NO_DDP */ - if (server_children) - server_child_kill(server_children, CHILD_DSIFORK, sig); switch( sig ) { case SIGTERM : LOG(log_note, logtype_afpd, "AFP Server shutting down on SIGTERM"); AFPConfig *config; + + if (server_children) + server_child_kill(server_children, CHILD_DSIFORK, sig); + for (config = configs; config; config = config->next) if (config->server_cleanup) config->server_cleanup(config); @@ -133,6 +135,9 @@ static void afp_goaway(int sig) nologin++; auth_unload(); LOG(log_info, logtype_afpd, "disallowing logins"); + + if (server_children) + server_child_kill(server_children, CHILD_DSIFORK, sig); break; case SIGHUP :