https://redmine.lighttpd.net/https://redmine.lighttpd.net/favicon.ico?13667327412017-01-24T23:34:32Zlighty labsLighttpd - Feature #2785: graceful restart with SIGUSR1https://redmine.lighttpd.net/issues/2785?journal_id=108082017-01-24T23:34:32Zgstrauss
<ul><li><strong>Related to</strong> <i><a class="issue tracker-1 status-5 priority-4 priority-default closed" href="/issues/2782">Bug #2782</a>: init scripts outdated, should be removed</i> added</li></ul> Lighttpd - Feature #2785: graceful restart with SIGUSR1https://redmine.lighttpd.net/issues/2785?journal_id=108092017-01-25T09:34:55Zgstrauss
<ul></ul><p>The following is not included in the upcoming patch, but is being considered.</p>
<p>Should lighttpd be modified to <em>add</em> graceful reload of configuration when lighttpd receives SIGHUP? Current lighttpd behavior is to just re-open error and access log files, and this should be preserved, but since reloading configuration on SIGHUP is a widely accepted convention, let's consider if lighttpd should <em>add</em> this behavior on SIGHUP, too.</p>
<pre>
--- a/src/server.c
+++ b/src/server.c
@@ -1362,6 +1362,7 @@ static int server_main (server * const srv, int argc, char **argv) {
*/
if (handle_sig_hup) {
handle_sig_hup = 0;
+ if (buffer_string_is_empty(srv->srvconf.changeroot)) raise(SIGUSR1);
log_error_cycle(srv);
@@ -1513,6 +1514,7 @@ static int server_main (server * const srv, int argc, char **argv) {
/* reset notification */
handle_sig_hup = 0;
+ if (buffer_string_is_empty(srv->srvconf.changeroot) && 0 == oneshot_fd) raise(SIGUSR1);
/* cycle logfiles */
</pre> Lighttpd - Feature #2785: graceful restart with SIGUSR1https://redmine.lighttpd.net/issues/2785?journal_id=109022017-02-25T20:55:14Zgstrauss
<ul><li><strong>Status</strong> changed from <i>Patch Pending</i> to <i>Fixed</i></li><li><strong>% Done</strong> changed from <i>0</i> to <i>100</i></li></ul><p>Applied in changeset <a class="changeset" title="[core] graceful restart with SIGUSR1 (fixes #2785) more consistent cleanup of resources at shutd..." href="https://redmine.lighttpd.net/projects/lighttpd/repository/14/revisions/6c1e6e660e97318ed10360002130f03ffbc4a6ae">6c1e6e660e97318ed10360002130f03ffbc4a6ae</a>.</p>