daemon: further tweaks to keepalive handling
authorAdam Dickmeiss <adam@indexdata.dk>
Thu, 3 May 2012 14:38:24 +0000 (16:38 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Thu, 3 May 2012 14:38:24 +0000 (16:38 +0200)
commitfdbc68116e40436502229bbbabec0c3d6b9da378
tree2a7499a142b5c38800d7b31385d78c6aabf2708c
parentab4fa4869bf147f316b418e6c1a24807d82ed5f6
daemon: further tweaks to keepalive handling

SIGTERM: we wait until child terminates. This ensures that stop
script can safely assume that when moniotor process is gone, the
listening socket is closed.
SIGHUP: we send a signal to child process. Wait 2 seconds and stop
without waiting for child to terminate. Indeed it may still be running
serving remaining request. We have no way to know if the child has
really closed the listening socket within the two seconds we wait.
src/daemon.c