]> git.tuebingen.mpg.de Git - paraslash.git/commitdiff
server: Early vss shutdown for command handlers.
authorAndre Noll <maan@tuebingen.mpg.de>
Wed, 20 Oct 2021 19:13:58 +0000 (21:13 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Mon, 16 May 2022 18:28:34 +0000 (20:28 +0200)
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.

server.c

index 1020e4fed98ac03d0981d80d517e68abf6e3a76f..e0df714be975b083f4d3cc7116ad0af2501a2b46 100644 (file)
--- 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();