Ondřej Svoboda has uploaded a new change for review.

Change subject: utils: Extend pgrep to accept multiple process names
......................................................................

utils: Extend pgrep to accept multiple process names

Change-Id: I891ee6c36b4198ce9900e56a62939b9a7bafbc6e
Bug-Url: https://bugzilla.redhat.com/987813
Signed-off-by: Ondřej Svoboda <[email protected]>
---
M lib/vdsm/utils.py
1 file changed, 2 insertions(+), 2 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/vdsm refs/changes/39/23239/1

diff --git a/lib/vdsm/utils.py b/lib/vdsm/utils.py
index f3b490a..0a5471e 100644
--- a/lib/vdsm/utils.py
+++ b/lib/vdsm/utils.py
@@ -265,12 +265,12 @@
         yield int(pid)
 
 
-def pgrep(name):
+def pgrep(*names):
     res = []
     for pid in iteratePids():
         try:
             procName = pidStat(pid).comm
-            if procName == name:
+            if procName in names:
                 res.append(pid)
         except (OSError, IOError):
             continue


-- 
To view, visit http://gerrit.ovirt.org/23239
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I891ee6c36b4198ce9900e56a62939b9a7bafbc6e
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Ondřej Svoboda <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to