oslo.service/oslo_service
Terry Wilson daa2baa4b3 Make signal handling order predictable
Due to the unordered nature of sets, it is possible for signal
handlers like _gracefull_shutdown() to run first and clear the
_signal_handlers before other registered handlers have run.

This patch converts _signal_handlers from a set to a list and
then runs the handlers LIFO similar to how atexit functions are
run. Given that the handlers added in service.py are added after
clearing the signal_handlers, they are guaranteed to be the first
in the list and the last run.

Change-Id: Ief3ab2f56fa3d805296709e12e5f7a71560f7b6e
Closes-Bug: #2057809
Related-Bug: #2056366
Signed-off-by: Terry Wilson <twilson@redhat.com>
(cherry picked from commit d026081ca4)
(cherry picked from commit 028809f769)
2024-04-26 07:16:57 +00:00
..
locale/en_GB/LC_MESSAGES Imported Translations from Zanata 2022-06-21 03:50:34 +00:00
tests Fix misuse of assertTrue 2022-09-19 01:12:30 +00:00
__init__.py Drop custom implementation of EVENTLET_HUB 2020-11-30 09:00:47 -05:00
_i18n.py Update URLs in documents according to document migration 2017-07-12 23:28:29 +08:00
_options.py Make debug option of wsgi server configurable 2021-12-21 11:23:23 +00:00
eventlet_backdoor.py Fix fo() backdoor command for non-class objects 2021-10-05 08:29:50 +00:00
fixture.py Use eventletutils Event class 2019-01-10 22:06:11 +00:00
loopingcall.py Fix BackOffLoopingCall error so it is not misleading 2021-09-16 10:18:35 -07:00
periodic_task.py Drop six usages 2020-05-26 15:20:01 +02:00
service.py Make signal handling order predictable 2024-04-26 07:16:57 +00:00
sslutils.py Add Bandit to tox for security static analysis 2015-12-01 16:10:15 +03:00
systemd.py Fix argument type for _sd_notify() on python3 2016-03-31 10:51:19 -06:00
threadgroup.py Deprecate the ThreadGroup.cancel() API 2018-12-20 11:11:23 +13:00
version.py pbr.version.VersionInfo needs package name (oslo.xyz and not oslo_xyz) 2017-02-06 12:49:21 -05:00
wsgi.py Make debug option of wsgi server configurable 2021-12-21 11:23:23 +00:00