- send SIGUSR1 to fastcgi apps before SIGTERM

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@1724 152afb58-edef-0310-8abb-c4023f1b3aa9
svn/tags/lighttpd-1.4.14
Marcus Rückert 2007-04-09 18:27:59 +00:00
parent a0436cea45
commit 3c40b52929
1 changed files with 10 additions and 3 deletions

View File

@ -650,7 +650,11 @@ FREE_FUNC(mod_fastcgi_free) {
host = ex->hosts[n];
for (proc = host->first; proc; proc = proc->next) {
if (proc->pid != 0) kill(proc->pid, SIGTERM);
if (proc->pid != 0) {
/* libfcgi wants SIGUSR1 for killing */
kill(proc->pid, SIGUSR1);
kill(proc->pid, SIGTERM);
}
if (proc->is_local &&
!buffer_is_empty(proc->unixsocket)) {
@ -659,8 +663,11 @@ FREE_FUNC(mod_fastcgi_free) {
}
for (proc = host->unused_procs; proc; proc = proc->next) {
if (proc->pid != 0) kill(proc->pid, SIGTERM);
if (proc->pid != 0) {
/* libfcgi wants SIGUSR1 for killing */
kill(proc->pid, SIGUSR1);
kill(proc->pid, SIGTERM);
}
if (proc->is_local &&
!buffer_is_empty(proc->unixsocket)) {
unlink(proc->unixsocket->ptr);