Replace pidof call
Replace OS specific "pidof" call on more common and mostly equivalent "ps" call. It allows to use framework not only on RedHat based OS. Change-Id: I4ac1c145e30d7f2b43fcb371e819f9943eab91f1
This commit is contained in:
parent
afc4b47fbc
commit
cb1c3ff4f7
|
@ -123,4 +123,6 @@ def read_config(path):
|
|||
|
||||
|
||||
def _pid_of(name):
|
||||
return check_output(["pidof", name]).rstrip()
|
||||
cmd = ['ps', '-o', 'pid=', '-C', name]
|
||||
pidset = check_output(cmd).rstrip()
|
||||
return [(int(x) for x in pidset.splitlines())]
|
||||
|
|
Loading…
Reference in New Issue