diff options
author | Michael Still <mikal@stillhq.com> | 2019-02-06 03:32:33 +0000 |
---|---|---|
committer | Dan Smith <dansmith@redhat.com> | 2019-03-06 11:51:03 -0800 |
commit | 0250d66219f0b51934ef542aecedf5139758a24f (patch) | |
tree | 6e5983eb0cb35369a83c66a4ad1e3194d5c6897a /nova/privsep | |
parent | f3388d3e26373f3177a155d35462e0587193998c (diff) | |
download | nova-0250d66219f0b51934ef542aecedf5139758a24f.tar.gz |
Move killing processes to privsep.
The usual pattern, except we need to lookup signals a bit
differently.
Change-Id: I956d761b1dc0bdafd4cd29540b7d16ed0bd0f45f
Diffstat (limited to 'nova/privsep')
-rw-r--r-- | nova/privsep/utils.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/nova/privsep/utils.py b/nova/privsep/utils.py index b51bcf5926..0b98a10ad4 100644 --- a/nova/privsep/utils.py +++ b/nova/privsep/utils.py @@ -29,6 +29,8 @@ import sys from oslo_log import log as logging from oslo_utils import excutils +import nova.privsep + # NOTE(mriedem): Avoid importing nova.utils since that can cause a circular # import with the privsep code. In fact, avoid importing anything outside # of nova/privsep/ if possible. @@ -88,3 +90,8 @@ def supports_direct_io(dirpath): pass return hasDirectIO + + +@nova.privsep.sys_admin_pctxt.entrypoint +def kill(pid, signal): + os.kill(pid, signal) |