]> sourceware.org Git - lvm2.git/commit
lvmdbusd: Correct lvm shell signal & child process handling
authorTony Asleson <tasleson@redhat.com>
Wed, 21 Sep 2022 15:05:36 +0000 (10:05 -0500)
committerTony Asleson <tasleson@redhat.com>
Thu, 22 Sep 2022 13:33:06 +0000 (08:33 -0500)
commit36a8fb20bf8a42e7e3227ad85a2b29e0b1432b14
tree792e42c4496ee9b8888c5e4013ae102c2986daac
parentc21783d4929ffd60f567ea90c9ae7c644d793d12
lvmdbusd: Correct lvm shell signal & child process handling

Previously when the __del__ method ran on LVMShellProxy we would blindly
call terminate().  This was a race condition as the underlying process
may/maynot be present.  When the process is still present the SIGTERM will
end up being seen by lvmdbusd too.  Re-work the code so that we
first try to wait for the child process to exit and only then if it hasn't
exited will we send it a SIGTERM.  We also ensure that when this is
executed we will briefly ignore a SIGTERM that arrives for the daemon.
daemons/lvmdbusd/cfg.py
daemons/lvmdbusd/lvm_shell_proxy.py.in
daemons/lvmdbusd/utils.py
This page took 0.036472 seconds and 5 git commands to generate.