[core] do not send SIGHUP to process group unless server.max-workers is used (fixes #2711)

do not propagate sighup if 0 == server.max-workers; reduce impact of
sighup on child processes, such as piped loggers, by not forwarding
sighup signal unless server.max-workers configured

For those configuring server.max-workers, it is recommended that
piped loggers be used to avoid log corruption, and then admins can
avoid sending lighttpd SIGHUP as there is currently no benefit to
doing so with the standard modules (beyond that of log rotation of
non-piped access and error logs).

From: Glenn Strauss <gstrauss@gluelogic.com>

git-svn-id: svn://svn.lighttpd.net/lighttpd/branches/lighttpd-1.4.x@3076 152afb58-edef-0310-8abb-c4023f1b3aa9
This commit is contained in:
Glenn Strauss 2016-02-14 10:44:30 +00:00 committed by Stefan Bühler
parent 3fd80ff8ec
commit 5cc061bfab
2 changed files with 2 additions and 1 deletions

1
NEWS
View File

@ -9,6 +9,7 @@ NEWS
* use libmemcached instead of deprecated libmemcache
* add force_assert for more allocation results
* [mod_cgi] use MAP_PRIVATE to mmap temporary file (fixes #2715)
* [core] do not send SIGHUP to process group unless server.max-workers is used (fixes #2711)
- 1.4.39 - 2016-01-02
* [core] fix memset_s call (fixes #2698)

View File

@ -1119,7 +1119,7 @@ int main (int argc, char **argv) {
*
* we also send it ourself
*/
if (!forwarded_sig_hup) {
if (!forwarded_sig_hup && 0 != srv->srvconf.max_worker) {
forwarded_sig_hup = 1;
kill(0, SIGHUP);
}