Skip to content

Commit

Permalink
[FIXED JENKINS-5415] force terminate Jenkins if it fails to shut down
Browse files Browse the repository at this point in the history
  • Loading branch information
kohsuke committed Feb 4, 2011
1 parent d74253c commit 15c66f0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 3 additions & 0 deletions changelog.html
Expand Up @@ -52,6 +52,9 @@
<li class=bug>
Fixed a JVM dependency in debian package so that it can run with OpenJDK
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-8159">issue 8159</a>)
<li class=rfe>
Debian package will force-terminate Jenkins if it fails to shut down in 5 seconds.
(<a href="http://issues.jenkins-ci.org/browse/JENKINS-5415">issue 5415</a>)
</ul>
</div><!--=TRUNK-END=-->

Expand Down
6 changes: 4 additions & 2 deletions debian/debian/jenkins.init
Expand Up @@ -147,11 +147,13 @@ do_stop()
0)
$DAEMON $DAEMON_ARGS --stop || return 2
# wait for the process to really terminate
while true;
do
for n in 1 2 3 4 5; do
sleep 1
$DAEMON $DAEMON_ARGS --running || break
done
if get_daemon_status; then
force_stop || return 3
fi
;;
*)
force_stop || return 3
Expand Down

0 comments on commit 15c66f0

Please sign in to comment.