]> arthur.barton.de Git - netatalk.git/commitdiff
only forward SIGTERM and SIGUSR1 from parent to childs
authorFrank Lahm <franklahm@googlemail.com>
Sun, 1 May 2011 17:53:40 +0000 (19:53 +0200)
committerFrank Lahm <franklahm@googlemail.com>
Sun, 1 May 2011 17:53:40 +0000 (19:53 +0200)
NEWS
etc/afpd/main.c

diff --git a/NEWS b/NEWS
index bb5b26e32621be9951346f4bd25d714f82692e47..f8d92829c0ce4883ec62ef59eda9e7211471fdfd 100644 (file)
--- 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: 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
 * FIX: afpd: configuration reload with SIGHUP
 * FIX: afpd: crashes in the dircache
 * FIX: afpd: Correct afp logout vs dsi eof behaviour
index 7bee91f20facb6941cddf3cb105d94e52509cc04..9e34712e79f6b12887dd15a52f39a8c707b7b47d 100644 (file)
@@ -114,14 +114,16 @@ static void afp_goaway(int sig)
     asp_kill(sig);
 #endif /* ! NO_DDP */
 
     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;
 
     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);
         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");        
         nologin++;
         auth_unload();
         LOG(log_info, logtype_afpd, "disallowing logins");        
+
+        if (server_children)
+            server_child_kill(server_children, CHILD_DSIFORK, sig);
         break;
 
     case SIGHUP :
         break;
 
     case SIGHUP :