Dan Kenigsberg has submitted this change and it was merged.

Change subject: Introducing context manager to terminate async processes on 
internal fail
......................................................................


Introducing context manager to terminate async processes on internal fail

Part of the effort to omit the use of deathSignal.

The following code for example guaranties that process will be cleaned and exit
 after timeout without handling the kill call. If process will stay alive
after sigkill, "terminating" will register the process pid to zombiereaper.

proc = execCmd([cmd], sync=False)
with terminating(proc):
    if proc.wait(30) is None:
        raise Timeout()

Change-Id: I003cce39d62dba5644937fafaf2c6e24c526c075
Signed-off-by: Yaniv Bronhaim <[email protected]>
Reviewed-on: https://gerrit.ovirt.org/51407
Continuous-Integration: Jenkins CI
Reviewed-by: Piotr Kliczewski <[email protected]>
---
M lib/vdsm/commands.py
M lib/vdsm/utils.py
M tests/utilsTests.py
3 files changed, 75 insertions(+), 1 deletion(-)

Approvals:
  Piotr Kliczewski: Looks good to me, approved
  Yaniv Bronhaim: Verified
  Jenkins CI: Passed CI tests



-- 
To view, visit https://gerrit.ovirt.org/51407
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I003cce39d62dba5644937fafaf2c6e24c526c075
Gerrit-PatchSet: 19
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: Dan Kenigsberg <[email protected]>
Gerrit-Reviewer: Francesco Romani <[email protected]>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <[email protected]>
Gerrit-Reviewer: Piotr Kliczewski <[email protected]>
Gerrit-Reviewer: Yaniv Bronhaim <[email protected]>
Gerrit-Reviewer: gerrit-hooks <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to