reload does not shut down lighttpd gracefully
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lighttpd (Ubuntu) |
Fix Released
|
Medium
|
Andreas Hasenack |
Bug Description
I noticed that /etc/init.
Here's log message when I call init.d reload:
2017-07-28 22:54:10: (server.c.1558) server stopped by UID = 0 PID = 1
2017-07-28 22:54:10: (log.c.164) server started
Here's log message when I send SIGINT:
2017-07-28 23:30:29: (server.c.1442) [note] graceful shutdown started
2017-07-28 23:30:37: (server.c.1558) server stopped by UID = 0 PID = 16714
Note first line about graceful shutdown. Never happens when reload is done via init.d script.
ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: lighttpd 1.4.35-4ubuntu2
ProcVersionSign
Uname: Linux 4.10.0-26-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.10
Architecture: amd64
Date: Sat Jul 29 01:43:39 2017
InstallationDate: Installed on 2011-04-14 (2297 days ago)
InstallationMedia: Ubuntu-Server 10.04.2 LTS "Lucid Lynx" - Release amd64 (20110211.1)
SourcePackage: lighttpd
UpgradeStatus: Upgraded to xenial on 2016-07-30 (363 days ago)
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
modified.
description: | updated |
Changed in lighttpd (Ubuntu): | |
assignee: | nobody → Andreas Hasenack (ahasenack) |
Changed in lighttpd (Ubuntu): | |
status: | Triaged → In Progress |
importance: | Undecided → Medium |
tags: | added: server-next-drop |
tags: | removed: server-next server-next-drop |
tags: | removed: bitesize |
After reading man start-stop-daemon I found the problem.
"... schedule is a list of at least two items separated by slashes (/); each item may be -signal-number or [-]signal-name, which means to send that signal, or timeout, which means to wait that many seconds for processes to exit ..."
"If a schedule is specified, then any signal specified with --signal is ignored"
So a solution would be to remove "--signal INT" and change "--retry= TERM/60/ KILL/5" to "--retry= INT/60/ KILL/5" .
On my system it works as expected after these changes.