From: Andre Noll Date: Wed, 20 Oct 2021 19:13:58 +0000 (+0200) Subject: server: Early vss shutdown for command handlers. X-Git-Tag: v0.7.1~20 X-Git-Url: http://git.tuebingen.mpg.de/?a=commitdiff_plain;ds=sidebyside;h=018a7b7927b76044b28eece39039cb2f5ea9c192;p=paraslash.git server: Early vss shutdown for command handlers. Command must communicate with the vss through the shared memory area (mmd). Deallocating all resources early in the command handler makes the code more robust and saves some memory. --- diff --git a/server.c b/server.c index 1020e4fe..e0df714b 100644 --- a/server.c +++ b/server.c @@ -679,12 +679,13 @@ int main(int argc, char *argv[]) deplete_close_on_fork_list(); if (ret < 0) PARA_EMERG_LOG("%s\n", para_strerror(-ret)); + vss_shutdown(); } else { + vss_shutdown(); alarm(ALARM_TIMEOUT); close_listed_fds(); ret = handle_connect(sct->child_fd); } - vss_shutdown(); shm_detach(mmd); user_list_deplete(); free_lpr();