]> git.ipfire.org Git - thirdparty/haproxy.git/commit
MEDIUM: jobs: support unstoppable jobs for soft stop
authorWilliam Lallemand <wlallemand@haproxy.com>
Fri, 16 Nov 2018 15:57:20 +0000 (16:57 +0100)
committerWilly Tarreau <w@1wt.eu>
Fri, 16 Nov 2018 16:05:40 +0000 (17:05 +0100)
commita719926cf894c352c26419bc39bd37e21f615c0c
tree7a0fb1d4be060ab1162537b2ab0e9aaf86ddf6b4
parent3c0544efbf1da4f3fbf783bd7c4871e5a5e6e7ad
MEDIUM: jobs: support unstoppable jobs for soft stop

This patch allows a process to properly quit when some jobs are still
active, this feature is handled by the unstoppable_jobs variable, which
must be atomically incremented.

During each new iteration of run_poll_loop() the break condition of the
loop is now (jobs - unstoppable_jobs) == 0.

The unique usage of this at the moment is to handle the socketpair CLI
of a the worker during the stopping of the process.  During the soft
stop, we could mark the CLI listener as an unstoppable job and still
handle new connections till every other jobs are stopped.
include/types/global.h
include/types/stats.h
src/haproxy.c
src/stats.c