]> git.tuebingen.mpg.de Git - paraslash.git/commit
server: Exit cleanly on SIGINT/SIGTERM.
authorAndre Noll <maan@tuebingen.mpg.de>
Mon, 7 Aug 2017 19:41:00 +0000 (21:41 +0200)
committerAndre Noll <maan@tuebingen.mpg.de>
Tue, 13 Mar 2018 02:28:10 +0000 (03:28 +0100)
commit7f08e8b0eb9570f1eb787dbb4e10d56585b36bbf
tree64d661c5edd3258b6d0d943da498dd376bd1162b
parentac4e01ba1a2f302bf31dd511a7aff8da78660b15
server: Exit cleanly on SIGINT/SIGTERM.

Currently signal_post_select() kills all child processes and then
calls exit(3) if SIGNINT or SIGTERM was received. This leaves all file
descriptors open and memory blocks allocated, which makes debugging
memory leaks difficult because the valgrind output is hard to read.

This patch changes the server to cleanly shutdown the scheduler and
deallocate resources (close file descriptors, free memory, destroy
locks and shared memory areas) before exit(3) is called.
error.h
server.c