1
0
mirror of https://github.com/ARM-software/devlib.git synced 2025-01-31 02:00:45 +00: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:
Marc Bonnici 2021-03-31 10:04:22 +01:00 committed by setrofim
parent 09d0a0f500
commit 81f9ee2c50

View File

@ -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])