mirror of
https://github.com/ARM-software/devlib.git
synced 2025-07-08 23:02:40 +01:00
utils/android: Use busybox implementation of ps
On some older versions of ps the flags used to look up the pids are not supported and results in no output. Use the busybox implementation for consistency.
This commit is contained in:
@ -603,7 +603,7 @@ def adb_background_shell(conn, command,
|
|||||||
p = subprocess.Popen(full_command, stdout=stdout, stderr=stderr, shell=True)
|
p = subprocess.Popen(full_command, stdout=stdout, stderr=stderr, shell=True)
|
||||||
|
|
||||||
# Out of band PID lookup, to avoid conflicting needs with stdout redirection
|
# Out of band PID lookup, to avoid conflicting needs with stdout redirection
|
||||||
find_pid = 'ps -A -o pid,args | grep {}'.format(quote(uuid_var))
|
find_pid = '{} ps -A -o pid,args | grep {}'.format(conn.busybox, quote(uuid_var))
|
||||||
ps_out = conn.execute(find_pid)
|
ps_out = conn.execute(find_pid)
|
||||||
pids = [
|
pids = [
|
||||||
int(line.strip().split(' ', 1)[0])
|
int(line.strip().split(' ', 1)[0])
|
||||||
|
Reference in New Issue
Block a user