From 9fc93175b31054cc75765431f4a5d41f1b453bb7 Mon Sep 17 00:00:00 2001 From: Frank Lahm Date: Fri, 20 May 2011 17:27:00 +0200 Subject: [PATCH] Add sigquit --- etc/afpd/main.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/etc/afpd/main.c b/etc/afpd/main.c index 9e34712e..5e4da980 100644 --- a/etc/afpd/main.c +++ b/etc/afpd/main.c @@ -109,17 +109,16 @@ static void fd_reset_listening_sockets(void) /* ------------------ */ static void afp_goaway(int sig) { + AFPConfig *config; #ifndef NO_DDP asp_kill(sig); #endif /* ! NO_DDP */ - 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); @@ -131,6 +130,17 @@ static void afp_goaway(int sig) exit(0); break; + case SIGQUIT: + LOG(log_note, logtype_afpd, "AFP Server shutting down on SIGQUIT, NOT disconnecting clients"); + + for (config = configs; config; config = config->next) + if (config->server_cleanup) + config->server_cleanup(config); + + server_unlock(default_options.pidfile); + exit(0); + break; + case SIGUSR1 : nologin++; auth_unload(); -- 2.39.2